๐Ÿ’ป Dev & CSC++ Programming

C++ Programming Ch.11 Exercise 10 Solution

Problem: ๋‹ค์Œ์€ ํ”„๋กœ๊ทธ๋žจ๊ณผ Execution Result๋ฅผ ๋ณด์—ฌ์ค€๋‹ค. prompt ์กฐ์ž‘์ž๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ํ”„๋กœ๊ทธ๋žจ์„ ์™„์„ฑํ•˜๋ผ. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include #include using namespace std; int main() { string password; while(true) { cin >> prompt >> password; if(password == "C++") { cout << "login success!!" << endl; break; } else cout << "login fail. try again!!" << endl; } } Execution Result: ...

April 2, 2020 ยท 1 min ยท Sobamemil