-
-
Save abcsharp/1056070 to your computer and use it in GitHub Desktop.
情報の授業でやったbuggyな練習問題を仕様通りに動作させてみた
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::cout; | |
using std::cin; | |
int main(void) | |
{ | |
int time; | |
cin>>time; | |
if(time>=0&&time<24){ | |
if(t<=11) cout<<"おはよう"; | |
else if(t==12) cout<<"正午"; | |
else if(t<=17) cout<<"こんにちワン"; | |
else if(t<=23) cout<<"こんばんは"; | |
}else cout<<"範囲外"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/*(1)*/
の部分以外は書き換えられないんだぜ?なにしろペーパーテストの穴埋めだからな……