#25664: 解答(C++)


weimolin222@gmail.com (林維摩)


#include<iostream>

using namespace std;

int main(){

int n;

cin>>n;

if(n<=50){

cout<<n;

}

else{

cout<<n-1;

}

}

#30083: Re: 解答(C++)


yp11031198@yphs.tp.edu.tw (202-24裴逸翔)


#include

using namespace std;

int main(){

int n; cin>>n;

if(n<=50){cout<}

else{cout<}

}

本題要求不能用if條件式寫,雖說用if解不會錯,但這樣不就沒有挑戰性了嗎?



#30470: Re: 解答(C++)


gaspardthegenius (gaspard)


題目說禁止用IF