#17778: _c++


rexwu1104@gmail.com (黑雪公主 Black Lotus)


用 ? : 看起來就會很少。

#17780: Re:c++


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


用 ? : 看起來就會很少。


#include <iostream>
using namespace std;
int main(int argc, char** argv){ 
int a;
while(cin>>a)
cout<<a-(a%2)<<endl;
}

這樣更少?

#17783: Re:c++


rexwu1104@gmail.com (黑雪公主 Black Lotus)


用 ? : 看起來就會很少。


#include
using namespace std;
int main(int argc, char** argv){ 
int a;
while(cin>>a)
cout<<a-(a%2)<<endl;
}

這樣更少?

差不多

cout<<a-(a%2)<<endl;   <----->   a%2 ? cout << a-1 << endl : cout << a << endl;

#32307: Re: c++


yp11151230@yphs.tp.edu.tw (909-42蔡亞儒)


用 ? : 看起來就會很少。