Hi This is my first day with C++.
Iwas running the following program
#include<iostre am.h>
#include<conio. h>
main()
{
int x,y,z;
cout<< " input x,y \n";
cin>> x >> y;
z=x+y;
cout<< " z=" <<z<<"\n";
getch();
}
Problem: when I'm the Running the program using ctrl F9 in DOS , It asks for X & Y values then gives me output with no error, but The console screen shows all other statements also, If I'm running again this program the on console screen it shows me previous out also. I just want to see X & Y values on console output, please help me how to fix this
Iwas running the following program
#include<iostre am.h>
#include<conio. h>
main()
{
int x,y,z;
cout<< " input x,y \n";
cin>> x >> y;
z=x+y;
cout<< " z=" <<z<<"\n";
getch();
}
Problem: when I'm the Running the program using ctrl F9 in DOS , It asks for X & Y values then gives me output with no error, but The console screen shows all other statements also, If I'm running again this program the on console screen it shows me previous out also. I just want to see X & Y values on console output, please help me how to fix this
Comment