-
Notifications
You must be signed in to change notification settings - Fork 0
/
16.txt
50 lines (49 loc) · 979 Bytes
/
16.txt
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
#include<stdio.h>
int main()
{
int H,a,b;
printf("Please select the day.\n");
printf("Option 1 = Addition\n");
printf("Option 2 = Subtraction\n");
printf("Option 3 = Multiplication\n");
printf("Option 4 = Division\n");
scanf("%d",&H);
printf("Please enter an integral number\n");
scanf("%d",&a);
printf("Please enter another integral number.\n");
scanf("%d",&b);
switch(H)
{
int c;
case 1:
{
printf("You have selected Addition.\n");
c= a+b;
printf("%d",c);
break;
}
case 2:
{
printf("You have selected Subtraction.\n");
c= a-b;
printf("%d",c);
break;
}
case 3:
{
printf("You have selected Multiplication.\n");
c= a*b;
printf("%d",c);
break;
}
case 4:
{
printf("You have selected Division.\n");
c= a/b;
printf("%d",c);
break;
}
default:
{
printf("Give correct input");
}}}