Discussions Q&R
Python Else-If
0 Vote
4 RéponsesElse-If Statements
0 Vote
1 RéponseAbout else-if statement
0 Vote
1 RéponseHelp!!
1 Vote
7 Réponses<h1> syntax in 16.1
1 Vote
3 Réponseswhy 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 Votes
8 RéponsesПочему не работает?
0 Vote
2 RéponsesAujourd'hui en vedette
Python and unsigned int
0 Votes
Saturn League badge
1 Votes
Lua course?
1 Votes
certificate
1 Votes
Adding an image to my html
0 Votes
Not able to activate account
0 Votes
Sololearn keeps crashing
0 Votes
CSS
1 Votes
About Advanced Courses
0 Votes