The if else statement has this general form
If (test condition)
statement1
else
satement 2
if test-condition is nonzero the programexecutes statement 1 and skips over statement2.Ohterwise when test condition is zero(false),the program skips statement1 and executes and executes statement 2 instead.
Here is an example program
include
void main()
{
int bas;
cout<<"enter basic salary"
cin>>bas;
if(bas>1000)
cout<
cout<<>
}
No comments:
Post a Comment