c++ program for average of two numbers


#include <iostream.h> 
#include<conio.h> 
void main()
{
 double x, y; 
 clrscr(); 
 cout << "Enter Two Floating Values: "; 
 cin >> x ; 
 cin >> y; 
 cout << "The Average of the two Numbers is : " << (x+y)/2.0 << endl; 
 getch(); 
}

Output

Enter Two Floating Values: 20
30
The Average of the two Numbers is : 25