Operator in C++ : Operator « Language « C++
- C++
- Language
- Operator
Operator in C++

#include <iostream>
using namespace std;
int main()
{
double x, y;
cout << "Enter two floating-point values: ";
cin >> x ;
cin >> y;
cout << "The average of the two numbers is: " << (x + y)/2.0 << endl;
return 0;
}
Related examples in the same category