[ create a new paste ] login | about

Link: http://codepad.org/QWhRw2I8    [ raw code | output | fork ]

C, pasted on Sep 16:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "stdio.h"
 
int x, y;
 
void main()
 
{
printf("Please enter in the first whole number\n");
x =5;
printf("Please enter in the second whole number\n");
y = 10;
 
            if ((x % y) == 0)
printf("The number %d is a multiple of %d\n",x,y);
else
printf("The number %d is NOT a multiple of %d\n",x,y);
if ((y % x) == 0)
printf("The number %d is a multiple of %d\n",y,x);
else
printf("The number %d is NOT a multiple of %d\n",y,x);
     }


Output:
1
2
3
4
Please enter in the first whole number
Please enter in the second whole number
The number 5 is NOT a multiple of 10
The number 10 is a multiple of 5


Create a new paste based on this one


Comments: