SIMPLE IF STATEMENT
SIMPLE IF STATEMENT
The general
form of a simle if statement is
if(test
expression)
{
statement-block;
}
statement-x;
The
statement-block may be a single statement or a group of statements. If the test
expression is true, the statement-block will be executed; otherwise the
statement-block will be skipped and the execution will jump to the statement-x.
Remember, when the condition is true both the statement-block and the
statement-x are executed in sequence.
/* A program is to show the execution of IF Statement*/
#include<stdio.h>
void main(){
Int raining;
If(raining=true)
Printf(“ this is
rainy season”);
Printf(“this is too
rainy”);
Getch();
Comments
Post a Comment