2) Write a program that will allow you to enter 4 separate numbers. The code should be able to do the following:
a. Add the first 2 numbers
b. Subtract the third and fourth number
c. Multiply the first and third number
d. Divide the second and fourth number (and show the remainder if any exist)
this is what i did.... the only problem is idk how to get it to accept 4 numbers alone ....the program i wrote requires 8 numbers to be entered
#include <stdlib.h>
#include <iostream>
using namespace std;
int main()
{
float a, b, c, d, e, f, g, h;
cout << "Enter four numbers \n";
cin >> a >> b;
e= a + b;
cout <<"Sum of a + b = " << e << " \n";
cin >> c >> d;
f= c - d;
cout <<"Subtraction of c - d = " << f << " \n";
cin >> a >> c;
g = a * c;
cout << "Muldtplaction of a * c = " << g<<" \n";
cin >> b >> d;
h = b / d;
cout << "Division of b / d = " << h<<" \n";
system("pause");
return 0;
}