Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int Average(int x,int y);
- int main()
- {
- int num1,num2;
- cout<<"Enter the two numbers : ";
- cin>>num1>>num2;
- cout<<"Average : "<<Average(num1,num2);
- return 0;
- }
- int Average(int x,int y){
- int average=(x+y)/2;
- return average;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement