### College Homework Help

My homework assignment is to.

Write a c++ program that allows the user to enter two values. Display the results of adding the two values, subtracting them form each other, multiplying them, and dividing them. Note I am new to c++ I do not know how to do this if any one can help me please do so thank you.
In class tonight we wrote this but i still don't get it.
 ``123456789101112131415161718192021222324252627282930313233`` ``````// NumberDemo.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int a,b,c; double x,y,z; a = 13; b = 4; x = 3.3; y = 15.78; c = a + b; cout << "a + b is " << c << endl; z = x + y; cout << "x + y is " << z << endl; c = a / b; cout << "a / b is " << c << endl; c = a % b; cout << "a % b is " << c << endl; a = 2; c = ++a; cout << "a is " << a << " and c is " << c << endl; a = 2; c = a++; cout << "a is " << a << " and c is " << c << endl; system ("pause.exe"); return 0; }``````
Here is what you want to do:

 ``12345678910`` ``````int main() { // declare three vars to be used // ask for input for each var, check if input is good //print out the result of addition/multiplication/subtraction //example: cout << "The value is: " << (add two variable together here) << endl; return 0; }``````

make sense?
Sounds good to me.
Topic archived. No new replies allowed.