Compute remainder C Program

C program to compute remainder. To compute remainder, we use % operator.
#include<stdio.h>
int main()
{
	int a,b,remainder;
	printf("Enter first number: ");
	scanf("%d",&a);
	printf("Enter second number: ");
	scanf("%d",&b);
	/* % is used for computing remainder */
	remainder=a%b;
	printf("Remainder = %d\n",remainder);
	return 0;
}

Popular posts from this blog