program to (keep taking number as input from user until user enters a number which is multiple of 5.)
//keep taking number as input from user until user enters a number which is multiple of 5.
#include<stdio.h>
int main()
{
int n;
do{
printf("enter any number=");
scanf("%d", &n);
printf("%d\n", n);
if(n % 5 == 0){
break;
}
}
while(1);
printf("you have entered multiple of 5 ");
return 0;
}
output :
enter any number=1
1
enter any number=2
2
enter any number=4
4
enter any number=5
5
you have entered multiple of 5
--------------------------------
Process exited after 5.066 seconds with return value 0
Press any key to continue . .
Comments
Post a Comment
Please do not enter any spam link in the comment box.