0
C ++ countdown the code work but I did not receive any point
#include <iostream> using namespace std; int main() { int n; /* your code goes here */ for(int n = 11;n >0;n--){ cout<< n <<endl; if(n % 5 ==0){ cout << "Beep"<< endl; }; } // i won return 0; }
9 Réponses
+ 4
What is the use of int n ;
On loop statement u have created a new variable called int n =11;
So there is no use of int n;
+ 5
Re-read the task carefully and do not change the code already suggested.
+ 2
Why did you delete the data entry cin >> n?🤔
+ 1
If you want to refer to someone in particular, type the name through the symbol @Adegbite Ismail
0
You have created a new n in the loop so it will not access the n outside the loop
0
Try this
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
//your code goes here
while(n>0){
cout<<n<<endl;
if(n%5==0)
cout<<"Beep\n;
n--;
}
return 0;
}
0
Thanks guys
It has work
- 3
Hi coder I know but that's not the problem
There are
5 test case 3 is for pro
And 2 in for people like me
But test case 2 and 1
Mark it correct but no point
- 3
Please let talk on WhatsApp +2347042740799