C programs
C Program to enter a list of numbers, print the number until number is greater than 15
C Program to enter a list of numbers, print the number until number is greater than 15
#include<stdio .h="">
#include<conio .h="">
void main()
{
int num;
clrscr();
while(1)
{
printf("\nenter the number\n");
scanf("%d",&num);
if(num<=15)
printf("\nThe number is %d",num);
else
break;
}
getch();
}
*************OUTPUT***********
enter the number
5
The number is 5
enter the number
12
The number is 12
enter the number
20</conio></stdio>