//program to check that entered no is divisible by 5 or not.
#include<stdio.h>
#include<conio.h>
main()
{ int n,r,s,i;
printf("Enter the no ");
scanf("%d",&n);
s=0;
for(i=0;i<1;i++)
{ r=n%10;
n=n/10;
}
if(r==0||r==5)
printf("Entered no is divisible by 5");
else
printf("Entered no is Not divisible by 5");
getch();
}
No comments:
Post a Comment