Program to find the reminder without using reminder in C

Program to find the reminder without using reminder in C.




#include
#include
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