View Code of Problem 3495

#include<stdio.h>
#include <string.h>
#include <math.h>
int mod(int n,int m){
	int a;
	int b;
	a=n/m;
	b=n-a*m;
	return b;
}
int main(){
	int n,m;
	while(scanf("%d %d",&n,&m)!=EOF){
		int c;
		c=mod(n,m);
		printf("%d\n",c);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3495