Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5. int Average(int x,int y);
  6.  
  7.  
  8.  
  9. int main()
  10. {
  11.     int num1,num2;
  12.     cout<<"Enter the two numbers : ";
  13.     cin>>num1>>num2;
  14.    
  15.     cout<<"Average : "<<Average(num1,num2);
  16.     return 0;
  17. }
  18.  
  19.  
  20.  
  21. int Average(int x,int y){
  22.     int average=(x+y)/2;
  23.     return average;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement