A clean machine is a clean machine :-)
Answer:
note:
<u>solution is attached in word form due to error in mathematical equation. furthermore i also attach Screenshot of solution in word due to different version of MS Office please find the attachment</u>
Answer:
1. cout << "Num: " << songNum << endl;
2. cout << songNum << endl;
3. cout << songNum <<" songs" << endl;
Explanation:
//Full Code
#include <iostream>
using namespace std;
int main ()
{
int songNum;
songNum = 5;
cout << "Num: " << songNum << endl;
cout << songNum << endl;
cout << songNum <<" songs" << endl;
return 0;
}
1. The error in the first cout statement is that variable songnum is not declared.
C++ is a case sensitive programme language; it treats upper case and lower case characters differently.
Variable songNum was declared; not songnum.
2. Cout us used to print a Variable that has already been declared.
The error arises in int songNum in the second cout statement.
3. When printing more than one variables or values, they must be separated with <<