dudqls5630   3년 전

#include

int main() {

int H;

int M;

std::cin >> H >> M;

if (M >= 45)

{

std::cout << H << M - 45 << std::endl;

}

else

{

if (H == 0) {

std::cout << "23" << M + 15 << std::endl;

}

else

{

std::cout << H - 1 << M + 15 << std::endl;

}

}

return 0;

}

어디가 틀렸는지 모르겠습니다. 도와주세요 ㅜ

yj10516   3년 전

띄어쓰기 문제가 아닐까요?

kim27y   3년 전

1. include 문

2. 띄어쓰기

두가지만 고치시면 되네요

댓글을 작성하려면 로그인해야 합니다.