Answer to Question #17728 in C++ for mat

Question #17728
Respectd sir, I want a programm to display the countdown.Below i hv written a program to print numbers from 10 to 0.I want it to be displayed in the count down format. MODIFY THE BELOW PROGRAM IN THE COUNTDOWN FORMAT. #include<iostream.h> #include<conio.h> void main() { int i; clrscr(); for(i=10;i<11;i--) { cout<<i; } getch(); }
Expert's answer

#include <conio.h>
#include <iostream>
using namespace std;

void main()
{
for(int i=10;i>=0;--i)
{
cout<<i<<endl;
_sleep(1000);
}
getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal