Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Life, the Universe, and Everything , whats wrong with this c++ code

$
0
0

Hi im new to codechef and just wanted to know why this solution is not being accepted even though it gives me the correct output on codeblocks. I read the faqs and even those didnt help. Please see, thanks

include <iostream>

using namespace std;

int main() { int i, x[10];

for(i=0;i<4;i++)
{
        if (x[i]==42)
        break;
        else if(x[i]>=100)
        break;
            else if (x[i]<0)
            break;
        else
    cout<<x[i]<<"\n";

}

}


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>