¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuitaSesiones de PyR
Python Else-If
0 Votos
4 RespuestasElse-If Statements
0 Votos
1 RespuestaAbout else-if statement
0 Votos
1 RespuestaHelp!!
1 Voto
7 Respuestas<h1> syntax in 16.1
1 Voto
3 Respuestaswhy 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 RespuestasПочему не работает?
0 Votos
2 RespuestasEn tendencia hoy
What is the bug here??
0 Votes
Help me
0 Votes
Does any one know a free app to practice coding, i mean practicing things that you learn from here?
0 Votes
Help!
1 Votes
Career in cybersecurity
1 Votes