#12723: C++ easy


TuilpYu_OuO (38990<22000)

School : 臺北市私立延平高級中學
ID : 69060
IP address : [203.72.178.252]
Last Login :
2019-06-14 17:02:51
d277. 矩形对角线 | From: [203.72.178.252] | Post Date : 2017-09-21 17:18

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
while(cin>>n)
if((n%2)==1){
cout<<n-1<<endl;}
else{
cout<<n<<endl;}
return 0;
}

 
ZeroJudge Forum