teddy8 Full Stack Software Engineer

CodeUp - 기초100제(1069)

2019-06-20
teddy8

문제

URL : https://codeup.kr/problemsetsol.php?psid=23


소스코드

// 평가를 문자로 입력받아 내용 출력하기
// input : A
// output : best!!!
// 평가내용
// A : best!!!
// B : good!!
// C : run!
// D : slowly~

#include <iostream>

using namespace std;

int main()
{
	char c;
	cin >> c;

	if      (c == 'A') cout << "best!!!" << endl;
	else if (c == 'B') cout << "good!!"  << endl;
	else if (c == 'C') cout << "run!"    << endl;
	else if (c == 'D') cout << "slowly~" << endl;
	else cout << "what?" << endl;

	return 0;
}


Comments

Content