1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dima020 [189]
4 years ago
6

Which line in the following program will cause a compiler error? 1 #include 2 using namespace std; 3 4 int main() 5 { 6 int numb

er = 5; 7 8 if (number >= 0 && <= 100) 9 cout << "passed.\n"; 10 else 11 cout << "failed.\n"; 12 return 0; 13 }
Computers and Technology
1 answer:
KATRIN_1 [288]4 years ago
3 0

Answer:

Line 8 gives a compiller Error

Explanation:

In line 8, the statement: if (number >= 0 && <= 100) will give a compiller error because when using the logical and (&&) It is required to state the same variable at both sides of the operator. The correct statement would be

if (number >= 0 && number <= 100). The complete corrected code is given below and it will display the output "passed"

#include <iostream>

using namespace std;

int main()

{

   int number = 5;

   if (number >= 0 && number <= 100)

       cout << "passed.\n";

   else

       cout << "failed.\n";

   return 0;

}

You might be interested in
_______ are created under ________, similar to how you create individual files within a broader file folder
Vadim26 [7]
Arrows, columns........
4 0
3 years ago
Read 2 more answers
You can not give an exact size for a height for column width true or false
GalinKa [24]

Answer:

~false~

Explanation:

5 0
3 years ago
Which item converts a high level language program to low level machine instruction?
vodomira [7]
The compiler translates each source code instruction into the appropriate machine language instruction, an
8 0
3 years ago
A user input is when the user interacts with the program by typing.<br> True<br> False
Yuri [45]
The answer is true I think
6 0
3 years ago
Read 2 more answers
Pedro needs to write a block of code that will repeat a loop six times. Which type of loop should he use?
Leona [35]

Answer: D

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following filenames is acceptable on both Windows and Mac<br> operating systems?
    9·1 answer
  • Programmers often author which type of information to guide test runs?
    10·1 answer
  • Edhesive 4.1 question 1
    9·1 answer
  • You would like to know how many cells contain data. Which function should you use?
    11·1 answer
  • The greatest predictor of home Internet use is _____. income location race training
    5·2 answers
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • Plz answer -----------
    11·2 answers
  • What is the device that is non-volatile sometime called external memory?<br>​
    15·1 answer
  • Developing algorithms using psuedocode
    15·1 answer
  • What is the general term for programs used to operate a computer
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!