C
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
// enter all your numbers with the respective symbols + - * / =;
// for example 10-5+2*7/3=
#include <stdio.h>
int main() {
int num1;
int tot = 0;
char b;
scanf("%d", &num1);
do {
scanf("%c", &b);
if ( b == '=') {
break;}
tot += num1;
num1 = 0;
scanf("%d", &num1);
switch (b) {
case '+':
tot = tot + num1;
num1 = 0;
break;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run