Show toolbar

2014年7月2日 星期三

Cin and cout command

標題:輸入與輸出命令
VC++ (variable.cpp):
//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;
}

說明:
基本輸入與輸出命令

沒有留言:

張貼留言