+ 1
How can I make a timer to count and display number 0?
#include <iostream> using namespace std; int main() { int seconds; cin>>seconds; seconds = //your code goes here cout<<seconds; seconds--; return 0; }
5 Respuestas
+ 2
for(int i=seconds; i>=0; i--) cout << i << endl;
Keep learning & happy coding :D
https://code.sololearn.com/c7CTh5wLAT46
0
Thank you for your help sir. I forgot to mention that I am still in while loop lesson. It says that I should print the output of timer including number 0.
0
Q. Create a timer program that will take the number of seconds as input, output the remaining time and countdown to 0.
You need to output every number, including 0.
0
My output gave an infinite loop of 3.
0
We can implement the timer application effectively in javascript than any other programming
Since it is scripting development is very easy and comfortable