Submission #147957

# Submission time Handle Problem Language Result Execution time Memory
147957 2019-08-31T10:14:12 Z 연구맨(#3667, foja001) Get Hundred Points! (FXCUP4_hundred) C++17
Compilation error
0 ms 0 KB
#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);
    }

Compilation message

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:19:5: error: expected statement at end of input
     }
     ^
hundred.cpp:10:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (max(A, max(B, C) == A) {
     ^~
cc1plus: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
hundred.cpp:19:5: error: expected '}' at end of input
     }
     ^
hundred.cpp:19:5: warning: no return statement in function returning non-void [-Wreturn-type]