after i give the input
the screen disappears
all the commands are correct
even then it only takes input
how i can see outputs??

Use you command promt and run. Or if you want to run it directly add std::cin.get() at the end of main() to wait for a keystroke. However this wont work under certain circumstances as mentioned here.

>how to display result in C

Hi you can use
int main()
{
int x=1;
printf( "% d ", x );
getchar(); /*or you can use system("pause");*/
}

Was that first post meant to be a Haiku or something ;)

Use you command promt and run. Or if you want to run it directly add std::cin.get() at the end of main() to wait for a keystroke. However this wont work under certain circumstances as mentioned here.

Actually, wait for an ENTER :icon_wink:

Was that first post meant to be a Haiku or something ;)

More like a non-rhyming limerick -- 5 lines :)