I am curious and need some more insight on coding as a whole Why does it work? How does it work such as the following:
int main()
int a = 4
std::cout <<
int sum = a + b + c
What do all of these do and why do they work the way they do?
I am curious and need some more insight on coding as a whole Why does it work? How does it work such as the following:
int main()
int a = 4
std::cout <<
int sum = a + b + c
What do all of these do and why do they work the way they do?
int a = 4 //Declares and integer variable called a and assigns a value of 4 to it
std::cout << //cout prints to the console using namespace std; which can also be typed in the format std::cout
int sum = a + b + c //and I'm assuming they are declared and also integers this takes the values in the variables within a, b and c adds them together and places the result in a variable called sum
thank you for the explnation it was very helpful
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.