Sunday, April 8, 2012

find the reminder without using reminder

#include <stdio.h>
#include <conio.h>
main()
{
int a,b;
clrscr();
printf("enter the value of a=");
scanf("%d",&a);
printf("enter the value of b=");
scanf("%d",&b);
while(a-b>=b)
{
a=a-b;
}
printf("the reminder is =%d",a-b);
getch();
}

No comments:

Post a Comment