제출 #147964

#제출 시각아이디문제언어결과실행 시간메모리
147964연구맨 (#201)백점을 받아랏! (FXCUP4_hundred)C++17
컴파일 에러
0 ms0 KiB
#include "hundred.h" #include <string> using namespace std; int max(int a,int b){ if(a>b)return a; else return b; } std::string GetHundredPoints(int A, int B, int C) { string strA; if (max(A, max(B, C) == A) { strset(strA, "A", 100); Mark(strA); } else if (max(A, max(B, C) == B) { strset(strA, "B", 100); Mark(strA); } else if (max(A, max(B, C) == C) { strset(strA, "C", 100); Mark(strA); } }

컴파일 시 표준 에러 (stderr) 메시지

hundred.cpp: In function 'std::__cxx11::string GetHundredPoints(int, int, int)':
hundred.cpp:10:32: error: expected ')' before '{' token
     if (max(A, max(B, C) == A) {
                                ^
hundred.cpp:22:1: error: expected primary-expression before '}' token
 }
 ^
hundred.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]