June 29th, 2013, 05:42 AM
Delaying program execution below
using namespace std;
int drying_revolution (int dryingspin_revolution);
int rinsing_revolution (int rinsingspin_revolution);
cout<<"...CHOOSE YOUR DESIRE WASHING MODE...\n";
cout<<"ENTER 'a' for cotton mode\n";
cout<<"ENTER 'b' for Quick wash\n";
int temperature_sensor=0; //reading from the temperature sensor console in degree celsius
int rinsingspin_revolution = 0;
int dryingspin_revolution=0; // read revolution from the motor spin console
char washtype; //gotten from user via the buttons on the machine control
char cotton = 'a';
char quickwash= 'b';
if (washtype == cotton) //link cotton as the washtype selected by the user on the machine through console
temperature_sensor = 80; // a signal is send through the console to the heater to heat the water till the temperature sensor sense up to 80 deg celcius
cout<<"................water heating in progress.......\n";
cout <<"ready for cotton";
cout<<"............washing in progress.......";
if(washtype == quickwash) // links quick wash as the washtype selected by the user on the machine through the console
temperature_sensor = 40; //a signal is send through the console to heat the heater to continue heating till the temperature sensor sense up to 40 deg celcius
cout<<"ready for quick wash";
int rinsing_revolution (int rinsingspin_revolution); // set the rinse spin at 1000 revolution
int drying_revolution (int dryingspin_revolution); //set the dry rinse at 1000revolution
cout<<"drying in progress......\n";
June 29th, 2013, 08:43 AM
Until you learn to use [code][/code] tags, few people will give your posts a second thought.
You've been here long enough to understand that by now.
If I understood correctly your question, you need to use sleep(time); function.
He did not actually ask a question. But in any case the code is for Windows, so in fact he would need Sleep( time_in_millisec ) - with a capital S. The POSIX sleep() function (with lower-case s) takes time in seconds.
Originally Posted by Vincentas