M
mrDumbass
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
using namespace std;
/*
i would like to keep the numbers of the output : Power , step etc,
on the same place in the console. But this isnt going to work with
this code... So the idea is that the numbers behind the '=' signs
change
without going down in the console. how do i do this ?
*/
int main()
{
int dummie;
cout << "Power = 45\n";
cout << "Step = 1\n";
cout << "Magnitude = 34\n";
cout << "press a digit";
scanf("%d",&dummie); // press key..
cout << "\r\r\r\rPower = 48\n"; // going back to first line and
overwrite it.
cout << "Step = 2\n"; // overwrite second line with new data.
cout << "Magnitude = 29\n"; // overwrite last line with new data.
cout << "press a digit";
scanf("%d",&dummie); // press key..
return(1);
} // well this doesnt work but how do i change the code to make it work
?
#include <algorithm>
#include <string>
#include <fstream>
using namespace std;
/*
i would like to keep the numbers of the output : Power , step etc,
on the same place in the console. But this isnt going to work with
this code... So the idea is that the numbers behind the '=' signs
change
without going down in the console. how do i do this ?
*/
int main()
{
int dummie;
cout << "Power = 45\n";
cout << "Step = 1\n";
cout << "Magnitude = 34\n";
cout << "press a digit";
scanf("%d",&dummie); // press key..
cout << "\r\r\r\rPower = 48\n"; // going back to first line and
overwrite it.
cout << "Step = 2\n"; // overwrite second line with new data.
cout << "Magnitude = 29\n"; // overwrite last line with new data.
cout << "press a digit";
scanf("%d",&dummie); // press key..
return(1);
} // well this doesnt work but how do i change the code to make it work
?