#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(); }
Enter Two Floating Values: 20 30 The Average of the two Numbers is : 25