if loop C program ( easy )
#include<conio.h>
void main()
{
int number;
clrscr();
printf("enter either 1 or 2");
scanf("%d",&number);
if(number==1)
{
printf("one");
}
else if(number==2)
printf("two");
getch();
}
OUTPUT: enter either 1 or 2
one
No comments:
Post a Comment