Hey guys,
I am taking my first c++ class and having a lot of trouble.
I understand how to do basic stuff but I'm lost in using while loops and these other functions, the professor is no help at all just reading off of powerpoints. Is there a way I can help teach myself like a guide or something that would help me do better in using c++.
int i = 0; // declare a letter as integer and assign value of 0 for loop to use. give loop number to start at. integers are -32,768 to positive 32,767. if unsigned, then 0 to 65535. non negative.
long keyword can be used for larger integers.
while (i < 9)
{ // braces used for more than one line of code under while. typical to have 2 lines or more.
printf("Hello World\n"); // displays 9 times, numbers 0 through 8. \n puts a newline.
i++; // increments loop.
}