VC++ (variable.cpp):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | //Chapter 1 - cin and cout #include <iostream> #include <string> using namespace std; int main( void ) { int age = 19, year = 2011; string footballer = "" ; cout << "Input Name:" ; cin >> footballer; cout << footballer << " is a Brazilian footballer.\n" ; cout << "At the age of " << age << ", " << footballer << " won the " << year << " South American Footballer\n" ; system ( "pause" ); return 0; } |
說明:
基本輸入與輸出命令
沒有留言:
張貼留言