프로그래밍/c++ 명품프로그래밍

[c++]] p88. no7 문자열매치

ITGenerations 2017. 11. 8. 16:51




#include <iostream>

using namespace std;

int main()

{

char a[100];

char b[4] = { 'y','e','s' };

int i=0;



cout << "종료하고싶으면 yes를 입력하세요 >> ";

cin.getline(a, 100);

while (strcmp(a,b) != 0)

{

cout << "종료하고싶으면 yes를 입력하세요 >> ";

cin.getline(a, 100);

}

cout << "종료합니다" << endl;



}