I don't know to much about C++
but I tested it and found a few things wrong I will try explain what I did
explanantions are in comments in the code
Code: Select all
#include <iostream>
#include <stdio.h>
/* here I included stlib.h for system(PAUSE) */
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
int userNumber;
userNumber = 1-10;
cout << "Enter a number 1-10 ";
cin >> userNumber;
/* You don't need the first quotation marks here or <<*/
cout << userNumber << " \n\n";
system("PAUSE");
return 0;
}
But good job in writing what you did so far I think your problem was the quotation marks on line 11 were just a little off
anyway good luck to you in your learning