If statement: The condition evaluates to either true or false. True is always a non-zero value, and false is a value that contains zero. Instructions can be a single instruction or a code block enclosed by curly braces { }.
Program :
#include
int main()
{
int num1=1;
int num2=2;
if(num1
int main()
{
int num=19;
if(num
int main()
{
int num=1;
if(num
int main()
{
int marks=83;
if(marks>75){
printf(“First class”);
}
else if(marks>65){
printf(“Second class”);
}
else if(marks>55){
printf(“Third class”);
}
else{
printf(“Fourth class”);
}
return 0;
}
Output:
First class
The post If statement:
The condition evaluates to either true or false. True is always a appeared first on Scholars Hub Blog.