d559: 班號

http://zerojudge.tw/ShowProblem?problemid=d559

內容 :

在北市師大附中,每個班都有一個屬於自己的班號,例如188班、1100班…

而利用C語言的printf函式便能將整數變數輸出到螢幕上,

現在請你實作這個基本輸出。

輸入說明 :

測資中有多行整數n(1<=n<=1261)

輸出說明 :

請對應每個n輸出一行:

'C' can use printf("%d",n); to show integer like XXXX

(請參考範例輸出)

範例輸入 :

若題目沒有特別說明,則應該以多測資的方式讀取,若不知如何讀取請參考 a001 的範例程式。

1252 1000

範例輸出 :

'C' can use printf("%d",n); to show integer like 1252 'C' can use printf("%d",n); to show integer like 1000

提示 :

背景知識: 字串處理

請於紅色方框內填入適當程式,以完成程式。

#include <iostream>

#include <string>

using namespace std;

int main() {

int n;

while (cin >> n){

cout << "'C' can use printf(\"%d\",n); to show integer like "<< ___ <<endl;

}

//system("pause");

}