-
Notifications
You must be signed in to change notification settings - Fork 0
/
jun10Cassignment.txt
128 lines (101 loc) · 2.15 KB
/
jun10Cassignment.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#include<stdio.h>
int main(){
Q1) 34+78
int a=34;
int b=78;
int result= a+b;
printf("%d", result);
-----------------------------------------
Q2) 23-6
int a=23;
int b=6;
int result= a-b;
printf("%d", result);
-----------------------------------------
Q3) 45*2
int a=45;
int b=2;
int result= a*b;
printf("%d", result);
-----------------------------------------
Q4) 56/2
int a=56;
int b=2;
int result= a/b;
printf("%d", result);
-----------------------------------------
Q5) 45+78+23+12
int a=45;
int b=78;
int c=23;
int d=12;
int result= a+b+c+d;
printf("%d", result);
-----------------------------------------
Q6) 56*34+12/2-13
int a=56;
int b=34;
int c=12;
int d=2;
int e=13;
int result= a*b+c/d-e;
printf("%d", result);
-----------------------------------------
Q7) 1.2*6.7-4.5/2
float a=1.2;
float b=6.7;
int c=4.5;
int d=2;
float result= a*b-c/d;
printf("%f", result);
-----------------------------------------
Q8) 1.6*(12-2)/2+7.8-1.5
float a=1.6;
int b=12;
int c=2;
float d=7.8;
float e=1.5;
float result= a*(b-c)/c+d-e;
printf("%f", result);
-----------------------------------------
Q9) 4.5*1.2-(82/2)-5.6 +1.234
float a=4.5;
float b=1.2;
int c=82;
int d=2;
float e=5.6;
float f=1.234;
float result= a*b-(c/d)-e+f;
printf("%f", result);
-----------------------------------------
Q10) 8*1+(4-2)/1+6
int a=8;
int b=1;
int c=4;
int d=2;
int e=6;
int result= a*b+(c-d)/b+e;
printf("%d", result);
-----------------------------------------
Q11) 3.4+1.2*(3.7-1.2)/2+6.8
float a=3.4;
float b=1.2;
float c=3.7;
int d=2;
float e=6.8;
float result= a+b*(c-b)/d+e;
printf("%f", result);
-----------------------------------------
Q12) 8.9*1.67-(6.21-5.6)+7.8-34 +157
float a=8.9;
float b=1.67;
float c=6.21;
float d=5.6;
float e=7.8;
int f=34;
int g=157;
float result= a*b-(c-d)+e-f+g;
printf("%f", result);
-----------------------------------------
return 0;
}