F&A Diskussionen
[C++]Code for outputting maze
1 Stimme
1 AntwortWhy this code not showing output?
-2 Stimmen
2 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 Antworteni need c++ program does EXAMPLE: If the user entered the #’s: 999, 90,78,82,and 999
the output would be
AVERAGE = 250/3 = 83.3 AVERAGE WITH LOWEST DROPPED = 172/2 = 86.0
AVERAGE WHERE HIGHEST COUNTS TWICE =340/4 = 85.0
NOTE: Validate the input as being a plausible test score and require the user to reenter when not plausible.
1 Stimme
7 AntwortenWhy not normal I/O
0 Stimmen
1 AntwortContinuous problem
1 Stimme
1 AntwortHeute heiß
AI Takeover
2 Votes
Using Python on VScode
1 Votes
Python Developer
0 Votes
Average of Two Numbers
0 Votes
Hearts
0 Votes