mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-06 14:58:31 +00:00
commit
032557dc46
@ -183,15 +183,15 @@ int main()
|
|||||||
int myInt;
|
int myInt;
|
||||||
|
|
||||||
//Prints to stdout (or terminal/screen)
|
//Prints to stdout (or terminal/screen)
|
||||||
cout << "Enter your fav number:\n"
|
cout << "Enter your fav number:\n";
|
||||||
//Takes in input
|
//Takes in input
|
||||||
cin >> myInt;
|
cin >> myInt;
|
||||||
|
|
||||||
//cout can also be formatted
|
//cout can also be formatted
|
||||||
cout << "Your fav number is " << myInt << "\n"
|
cout << "Your fav number is " << myInt << "\n";
|
||||||
//Your fav number is ##
|
//Your fav number is ##
|
||||||
|
|
||||||
cerr << "Used for error messages"
|
cerr << "Used for error messages";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user