-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathFunction.cpp
More file actions
82 lines (68 loc) · 1.22 KB
/
Function.cpp
File metadata and controls
82 lines (68 loc) · 1.22 KB
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
#include <iostream>
using namespace std;
/*void sum ()
{
int a,b,c;
cout<<"Enter two numb"<<endl;
cin>>a>>b;
c=a+b;
cout<<"Addition is is "<<c;
}
int sub ()
{
int a,b,c;
cout<<"Enter two numb"<<endl;
cin>>a>>b;
c=a-b;
return c;
}
void multi (int x,int y)
{
int a,b,c;
a = x;
b = y;
c= a *b;
cout<<"Multiplication is "<<c;
}
int divv (int x2, int y2)
{
int c ;
c = x2 / y2;
return c;
}*/
int main()
{
/*
Function
1. No retyrn Type And no Arguments
2. With Return type And no Argument
3. No Return type And with Argument
4 With return Type and With Argument
Function Protype
Return Type - INT , Float , Char , Void(No return type).
Return Type Function Name (Arguments)
*/
//sum (); //Function Calling.
//int s;
//s = sub ();
//cout<<"Sub is "<<s;
// int x,y;
//cout<<"enter two number"<<endl;
//cin>>x>>y;
// multi(x,y);
int a,b,c;
int big(int x, int y);
cout<<"enter two number\n";
cin>>a>>b;
c = big(a,b);
cout<<"Greater number is "<<c;
}
int big(int x, int y)
{
if (x>y)
{
return x;
}
else
return y;
}