Friday, May 11, 2012

Program to check that entered no is divisible by 10 or not.


//program to check that entered no is divisible by 10 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)
 printf("Entered no is divisible by 10");
 else
 printf("Entered no is Not divisible by 10");
getch();
}

No comments:

Post a Comment