[C++ ] C++第三題檢驗跳出!!

看板NTUBIME100HW作者 (孟仔)時間18年前 (2007/12/12 10:34), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
#include "stdafx.h" #include "iostream" #include "conio.h" #include <string> using namespace std; void change(string a); void main() { char check='0'; do{ string a; getline(cin,a); change(a); cout<<"enter 1 to quit, or press any key to continue typing below!"; check=getch(); cout<<endl; }while(check!='1'); } void change(string a) { int i=0; for(i=a.length()-1;i>=0;i--) { cout<<a[i]; } cout<<endl; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.234

12/12 13:19, , 1F
問一下喔! 題目不是說要按ctrl+z跳出嗎??
12/12 13:19, 1F

12/12 22:35, , 2F
沒事~~~我問了蠢問題= =
12/12 22:35, 2F
文章代碼(AID): #17NqYYqL (NTUBIME100HW)