/*example of if else statement*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
int num;
printf("enter number;");
scanf("%d", &num);
if(num>0)
printf("%d is positive", num);
else
printf("%d is negative or zero",num);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int num;
printf("enter number;");
scanf("%d", &num);
if(num>0)
printf("%d is positive", num);
else
printf("%d is negative or zero",num);
system("pause");
return 0;
}
No comments:
Post a Comment