0

What is an output..?

void main() { clrscr(); int a=10, b; cout<<"Enter 10:"; cin>>b; if(b==a) { cout<<"What a good Employee!!"; } else { cout<<"Sorry!, you are not selected..!!"; } getch(); }

8th Mar 2018, 2:10 PM
mahima
2 Respostas
+ 3
Output is when you're given information back from something; in this case it's a program giving you information back. As for your code, I would say the output just depends upon what value you enter. If you enter 10 then you get first condition, if not you get the else condition. At a glance, I'd say you need to put clrscr(); after you declare your variables, rather than the very top. As well, I don't imagine that clrscr() or getch() would work in SoloLearn due to the nature of how it compiles and feeds back the output to us. Best of luck!
8th Mar 2018, 2:18 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 1
thank u jakob marley
8th Mar 2018, 2:28 PM
mahima