Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtisQ&A DiscussƵes
Python Else-If
0 Voto
4 RespostasElse-If Statements
0 Voto
1 RespostaHelp!!
1 Voto
7 Respostas<h1> syntax in 16.1
1 Voto
3 Respostaswhy does this code output that there is an error because the else statement doesn't have a corresponding if statement?. How do i correct this?
#include <iostream>
using namespace std;
int main() {
int a;
for (int x =0; x<5;x++){
cin>>a;
if (a<1){
cout<<"a cannot be less than 1\n";
}
else if (a>10){
cout <<"a cannot be greater than 10\n";
}
}
else{
cout<<"code can run now"<<endl;
}
return 0;
}
3 Votos
8 RespostasQuente hoje
What's the error in this code?
1 Votes
Py to Exe
0 Votes
How to find image links
0 Votes
I donāt know why but python seems to be harder than java to me does any body else fell like this?
0 Votes
What's wrong with my code?
0 Votes
How I can win more Heart?
0 Votes
TIMER
0 Votes