Hey, to start things off, it's nice that you show an attempt at doing it.
Second, a program can't have 2 int main(). This is because int main() is the starting point, and what will execute all your code.
So, the first assignment is to assign 3 variables. Two numbers, and then a total.
1 2 3 4 5 6 7 8 9 10 11
|
int main(){
int a, b, total;
a = 62;
b = 99;
total = a + b;
std::cout << "The value of 62 + 99 = " << total << std::endl;
char ch;
std::cin >> ch; // I rather use char ch, and then std::cin instead of system(commands)
return 0;
}
|
^ Something like that can be done for part 1 of your question.
I'm going to do #2 now, so I'll report back when done, unless someone does it before me.
EDIT: Before I go, please check how you declared your integers. You can't have int a, b, c, three integers. You can have int a, b, c, threeIntegers or ThreeIntegers, but you can't seperate them, it has to be ONE word.
Another thing, are lines 28 and 30 not giving you errors? You're declaring a as an int in your program, and then assigning it a float value
Edit2: Tarik beat me to it, and he's about to give you one badass explanation it seems.