[go: nahoru, domu]

Skip to content

SejalCh/Conditional-Statements-in-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conditional-Statements-in-C-

##AIM:To study different conditional statements in C++

##THEORY:

The conditional statements such as if, if else, switch, etc. are used for decision-making purposes in C++ programs.Conditional statements in C++ are programming constructs that allow a program to execute different blocks of code based on whether a certain condition is true or false.The syntax of conditional statements uses relational operators such as:
1.'<' and '>'- less than/greater than
2.'==' and '!=' - equal to/not equal to
3.'<=' and '>=' - less than equal to/greater than equal to

if, if-else , else conditional statements execute the block of codes based on whether the condition is true or false.Meanwhile the switch condition switches between different cases based on the user input.

Screenshot 2023-10-09 213117

##OUTPUTS

even_odd-Screenshot 2023-10-01 135107
largestofthree-Screenshot 2023-10-01 135228
switchcase_1-Screenshot 2023-10-01 135302
switchcase_2-Screenshot 2023-10-01 135340

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages