Reminder Value Without Using modulus Operator In C


#include<stdio.h> int main(){ int x,y; printf("\n Enter two Numbers"); scanf("%d %d",&x, &y); while(x>=y) { x=x-y; } printf("\n The reminder value is : %d",x); return 0; }

Output:-

Enter two Numbers 10 6 The reminder value is : 4