0
Please help me to solve given code . My output is 3 2 1 but the expected Output is: 3 enter 2 enter 1
#include <iostream> using namespace std; int main() { int seconds; int num=3; //your code goes here while (num >= 1){ cin>>seconds; cout <<num; num --; } return 0; }
3 Respostas
+ 6
Add the below stmt under while loop:
if(num==1)
{ cout<<num;
break; }
cout<<num<<" enter";
+ 6
Horilal S Nirmalkar what is the purpose of seconds in ur code?
0
We want 3 2 1 as output