-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalcul.c
More file actions
35 lines (30 loc) · 735 Bytes
/
Copy pathcalcul.c
File metadata and controls
35 lines (30 loc) · 735 Bytes
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
#include<stdlib.h>
#include<stdio.h>
#include "division.h"
#include "add.h"
void main()
{
char ch;
int a, b;
printf("Enter the the operation +,-,*,/");
scanf("%c", &ch);
printf("Enter the 2 numbers");
scanf("%d,%d", &a, &b);
switch(ch)
{
case'+':
add(a,b);
break;
case '-':
printf("the ans is %d", a-b);
break;
case '*':
printf("the ans is %d", a*b);
break;
case '/':
divi(a,b);
break;
default:
printf("Error in operation");
}
}