F&A Diskussionen
Python Else-If
0 Stimmen
4 AntwortenElse-If Statements
0 Stimmen
1 AntwortAbout else-if statement
0 Stimmen
1 AntwortWhy this code showing error??
1 Stimme
4 AntwortenHelp!!
1 Stimme
7 Antworten<h1> syntax in 16.1
1 Stimme
3 Antwortenwhy 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 Stimmen
8 AntwortenWhat is wrong with this code!
1 Stimme
3 AntwortenПочему не работает?
0 Stimmen
2 AntwortenHeute heiß
Web Development Job
3 Votes
Changing window size
0 Votes
Hello
1 Votes
Oop
0 Votes
Siver seguridad
0 Votes