-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsecond.cpp
49 lines (43 loc) · 866 Bytes
/
second.cpp
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
#include<iostream>
using namespace std;
int add(int a , int b, int c)
{
cout<<"here is your additoin "<<a+b+c;
}
int sub (int a , int b , int c)
{
cout<<"here is your subtraction "<<a-b-c;
}
int mutiply (int a, int b, int c)
{
cout<<"here is your multiplication "<<a*b*c;
}
int divison (int a, int b, int c)
{
cout<<"here is your divison "<<a/b/c;
}
int main()
{
int choicex , fnum , snum , unum;
cout<<"enter 1 for addition\nenter 2 for subtraction\n enter 3 for multiplication \n enter 4 for divison\n";
cin>> choicex ;
cout<<"enter your first number\n";
cout<<"enter your second number";
cin>>fnum>>snum>>unum;
if (choicex==1)
{
add(fnum,snum,unum);
}
else if (choicex==2)
{
sub(fnum,snum,unum);
}
else if (choicex==3)
{
mutiply(fnum,snum,unum);
}
else if (choicex==4)
{
divison(fnum,snum,unum);
}
}