-
Notifications
You must be signed in to change notification settings - Fork 0
/
arthematicfuncs.c
52 lines (40 loc) · 1.05 KB
/
arthematicfuncs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <stdio.h>
int addfunc();
int subfunc();
int mulfunc();
int divfunc();
int modfunc();
int main() {
int add,sub,mul,div,mod,inp1,inp2;
printf("\n**********Arthemactic Operations*********\n");
printf("Enter Number 1:");
scanf("%d",&inp1);
printf("Enter Number 2:");
scanf("%d",&inp2);
add = addfunc(inp1,inp2);
sub = subfunc(inp1,inp2);
mul = mulfunc(inp1,inp2);
div = divfunc(inp1,inp2);
mod = modfunc(inp1,inp2);
printf("The addition of %d and %d : %d\n",inp1,inp2,add);
printf("The substraction of %d and %d : %d\n",inp1,inp2,sub);
printf("The multiplication of %d and %d : %d\n",inp1,inp2,mul);
printf("The division of %d and %d : %d\n",inp1,inp2,div);
printf("The modulous of %d and %d : %d\n",inp1,inp2,mod);
return 0;
}
int addfunc(int1,int2){
return (int1+int2);
}
int subfunc(int1,int2){
return (int1-int2);
}
int mulfunc(int1,int2){
return (int1*int2);
}
int divfunc(int1,int2){
return (int1/int2);
}
int modfunc(int1,int2){
return (int1%int2);
}