Browse Source

arith.cpp

master
DEW 7 months ago
parent
commit
3096a8882f
  1. BIN
      arith
  2. 18
      arith.cpp

BIN
arith

Binary file not shown.

18
arith.cpp

@ -0,0 +1,18 @@
#include <iostream>
int main()
{
using namespace std;
float hats, heads;
cout.setf(ios_base::fixed, ios_base::floatfield);
cout << "Enter a number: ";
cin >> hats;
cout << "Enter another number: ";
cin >> heads;
cout << "hats = " << hats << "; heads = " << heads << endl;
cout << "hats + heads = " << hats + heads << endl;
cout << "hats - heads = " << hats - heads << endl;
cout << "hats * heads = " << hats * heads << endl;
cout << "hats / heads = " << hats / heads << endl;
return 0;
}
Loading…
Cancel
Save