int x, y;
if(y == 8) {;}
if(x == 5)
{
cout << "@@@@@" << endl;
}
else
{
cout << "#####" << endl;
}
cout << "$$$$$" << endl;
cout << "&&&&&" << endl;
return 0;
}
something like this?This won't produce quite the required output but I think it might be a start for you - I recklon to solve it you have to use curly braces to un-nest the ifs.
Main Topics
Browse All Topics





by: pankajtiwaryPosted on 2005-01-24 at 00:24:49ID: 13119281
I am not able to understand the question. But what I can see from your code is you are trying to compare the values of x and y (which have not still been initialized) with conatant values, which is bad. Also I am confused about the actual output and expected output. Please restate your question so we will be able to help you.