First time in a computer science class. First lab assignment. Wrote exactly what the teacher wrote, yet it wont compile, and neither the teacher or I can figure out why. Please help. Thank you.
#include <iostream>
#include <string>
using namespace std;
int main ()
{
int number;
string residence;
//Just an example of a comment
cout << "Hello. Welcome to CSCI-1!" endl;
cout << "Spring 2014" endl;
cout << "please enter a number: " endl;
cin >> number;
cout << "you entered the number: " << number <<endl;
cout<<"Please enter your state of residence: " endl;
cin>>residence;
cout <<"you stated you live in " << residence <<"." <<;
return 0;
}
Errors:
lab01.cpp: In function ‘int main()’:
lab01.cpp:11: error: expected ‘;’ before ‘endl’
lab01.cpp:12: error: expected ‘;’ before ‘endl’
lab01.cpp:14: error: expected ‘;’ before ‘endl’
lab01.cpp:19: error: expected ‘;’ before ‘endl’
lab01.cpp:21: error: expected primary-expression before ‘;’ token