-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCODE9.cpp
More file actions
32 lines (26 loc) · 778 Bytes
/
CODE9.cpp
File metadata and controls
32 lines (26 loc) · 778 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
#include<iostream>
using namespace std; //LEARN ABOUT FUNCTION AND PARA METER AND PROTOTYPE
//******************************//
// int sum(int a,int b)
// {
// int c;
// c= a+b; //<----------------this is function
// return c;
// }
int sum(int ,int); //<-------this is function prototype
int main()
{
int a,b;
cout<<"input first value"<<endl;
cin>>a;
cout<<"input second value"<<endl;
cin>>b;
cout<<"answer is = "<<sum(a,b);
return 0;
}
int sum(int a,int b)
{
int c;
c= a+b; //<----------------this is function
return c;
}