Skip to content

Commit

Permalink
Added a modulo division tester.
Browse files Browse the repository at this point in the history
  • Loading branch information
mblair committed Sep 20, 2010
1 parent 7437643 commit c54cc1b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mod_test.c
@@ -0,0 +1,15 @@
#include <stdio.h>

int main() {
int num1, num2, remainder;
char ch;

printf("Enter a dividend and a divisor for modulo division:\n");
scanf("%d%c%d", &num1, &ch, &num2);

remainder = num1 % num2;

printf("%d\n", remainder);

return 0;
}

0 comments on commit c54cc1b

Please sign in to comment.