Solution for Mathematics challenge-Maximum Draws-HackerRank

 C++ solution for hackerRank Mathematics challenge-Maximum Draws

-Dinesh Kumar E

Code:

#include<iostream>
using namespace std;
int main()
{
int a,con,b;
cin>>a;
con=a;
int array[a];
for(a=0;a<con;a++)
cin>>array[a];
for(a=0;a<con;a++)
{
b=((array[a]*2)/2)+1;
cout<<b<<endl;
}
}

Comments

Popular Posts