We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In an "If statement" what will happen if we directly give "even".Instead of giving through an array?
Example:
int i,b,c;
string a[11]={"odd","one","two","three","four","five","six","seven","eight","nine"};
cin>>c>>b;
for(i=c;i<=b;i++)
{
if((i>9) && (i%2==0))
cout<<"even"<
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
For Loop
You are viewing a single comment's thread. Return to all comments →
In an "If statement" what will happen if we directly give "even".Instead of giving through an array? Example: int i,b,c; string a[11]={"odd","one","two","three","four","five","six","seven","eight","nine"}; cin>>c>>b; for(i=c;i<=b;i++) { if((i>9) && (i%2==0))
cout<<"even"<