I'm basically just asking if it is OK? I know it works, but I'm looking for ways to improve my coding, making sure nothing I do is bad practice.
- Code: Select all
#include <iostream>
using namespace std;
int tempInt1 = 1;
int tempInt2 = 2;
int tempInt3 = 3;
int total1 = tempInt1 + tempInt2;
int total2 = total1 * tempInt3;
int main()
{
cout << "Hello World!" << endl;
cout << "We are going to be adding a few numbers:" << endl;
cout << "First we will add: " << tempInt1 << " + " << tempInt2 << " = " << total1 << endl;
cout << "Next, we will multiply " << total1 << " * " << tempInt3 << " = " << total2 << endl;
cout << "Goodbye world!" << endl;
return 0;
}
Trying now to think of what I could design, for a little practice.
Any ideas?





