/* File: Arithmetic/floatOp.cpp Author: Mihaela Malita
Title: Basic operations with real (floating numbers)
Example: Enter two numbers? 3.7 5.3
3.7 + 5.3 = 9
3.7 - 5.3 = -1.6
3.7 * 5.3 = 19.61
3.7 / 5.3 = 0.698113
*****************************************************/
#include
using namespace std;
int main() {
float n1, n2;
/*-- ask 2 float numbers from user --*/
cout << "Enter two numbers? " ; cin >> n1 >> n2;
/*-- perform operations on the two numbers --*/
cout << n1 << " + " << n2 << " = " << n1 + n2 << endl
<< n1 << " - " << n2 << " = " << n1 - n2 << endl
<< n1 << " * " << n2 << " = " << n1 * n2 << endl
<< n1 << " / " << n2 << " = " << n1 / n2 << endl ; //careful not divide by ZERO
return 0;
}//main