TASK -
Get two numbers X and Y from the user and print the remainder of x%y.
Expected Output:
In C programming we are facilitated with many operation among those % is used to find remainder of two numbers: here is the program.
CODE:
#include<stdio.h>
int main(){
int x,y,remainder;
printf("Enter the Numbers \n");
printf("X: ");
scanf("%d",&x);
printf("\n");
printf("Y: ");
scanf("%d",&y);
remainder=x%y; //When x is divided by y there must be a remainder 0 or greater than 0
printf("\nThe remainder %d ",remainder);
getchar();
return 0;
}
Very Helpful
ReplyDeleteThanx for sharing excellent information
ReplyDelete