看板 NTUBIME100HW 關於我們 聯絡資訊
#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
Pineapple225:問一下喔! 題目不是說要按ctrl+z跳出嗎?? 12/12 13:19
Pineapple225:沒事~~~我問了蠢問題= = 12/12 22:35