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
guapka [62]
2 years ago
10

The function of anOR gate can best be described as a gate which provides an output of 1 only when

Computers and Technology
1 answer:
amid [387]2 years ago
5 0

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

void OR_gate()//defining a method OR_gate

{

bool a,b;//defining bool vaiable

cin>>a>>b;//input value

if(a or b)//use if block to check condition

{

cout<<"1";//print message

}

}

int main()//defining main method

{

OR_gate();//calling method OR_gate  

return 0;

}

Output:

0

1

1

Explanation:

In the above program, a method "OR_gate" is declared, and inside the method two bool variable "a and b" is defined, which input the value from the user end.

In the next step, an if block is defined, that uses the or gate to check input value and print the value that is equal to 1, and inside the main method, it call the "OR_gate" method.

You might be interested in
Three types of common program errors are syntax, runtime, and logic. (5 points)
adoni [48]

Answer:

True

Explanation:

3 0
3 years ago
Read 2 more answers
What is data consolidation?
Katarina [22]
<span>Data consolidation is the gathering and/or integration of data coming from many and diverse  sources and going into a single destination. Meanwhile this process is taking place,  different data sources are consolidated, into a single data store.

Hope this helps.</span>
8 0
3 years ago
If a tire fails or you have a blowout you should immediately concentrate your attention on
Orlov [11]

Stopping the car. Do not continue driving if your tire has failed or blown out. After you stop the car, call for roadside assistance. Remember, safety first when you're driving!

7 0
3 years ago
Read 2 more answers
What has abstraction enabled users to do?
Sindrei [870]

Answer:

c, understand what a computer does

8 0
2 years ago
Read 2 more answers
Have you seen this ProFlipperz Review? It is a course on how to flip every day household items for a profit.
Nadusha1986 [10]

Well if you have one I know it's cool but don't flip it all the time

Explanation:

6 0
2 years ago
Other questions:
  • How do i protect my computer from electrical spikes
    14·2 answers
  • Which type of address defines a single network interface in a computer or other device?
    7·1 answer
  • Explain how inflation flattens the universe
    6·2 answers
  • A major difference between digital librarians and traditional librarians is that traditional librarians rarely work with people.
    15·2 answers
  • Complete the program segment below to write the numbers 1 through 50 to the numbers.txt file.
    5·1 answer
  • I'm confused. Are , , and elements or nodes? What exactly defines nodes? What defines elements?
    13·1 answer
  • 1. What is wrong with the following code?
    5·1 answer
  • Suppose you own a travel agency in a large city. You have many corporate clients, but growth has slowed somewhat Some long-term
    15·1 answer
  • Saujani describes that women are highly underrepresented in STEM careersShe attributes this to women needing more confidence. Wh
    13·1 answer
  • Hello everyone! can anybody help me? i need help with computing.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!