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]
3 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]3 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
How to curl your hair with a curling iron
sashaice [31]
Turn the curlers on
wait for them to heat up
grab a decent amount of hair
wrap it around the tongs
count in your head to ten
release hair

this method always works for me and you can change the time you count depending on the type of curls you want
3 0
4 years ago
Maria wants to create a simple logo for her new flower shop. She would like to use the computer to create this logo. Maria shoul
xenn [34]

B) graphics software

5 0
3 years ago
Read 2 more answers
Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
Minchanka [31]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int exam1 = 70;

   int exam2 = 85;

   int examAverage;

   examAverage = (exam1+exam2)/2;

   cout <<"The Average of Exam1 and Exam2 is: "<<examAverage<<endl;

   return 0;

}

Explanation:

Using the C++, we declare the three variables all of type

exam1

exam2 and

examAverage

We assign initial values of 70 and 85 to exam1 and exam2 respectively

7 0
3 years ago
Mrs. Zoo gave out the rubric for our essay. She stated that our essay should be complete by Friday of that week. I didn't have t
Rom4ik [11]

Answer:

No

Explanation:

You had the whole week for the essay but didn't do it and then turned it in late.

6 0
3 years ago
To add the word "confidential" to the background of a page, users would need to _____.
KengaRu [80]
I beleive you need to insert a watermark
3 0
3 years ago
Other questions:
  • Write a recursive method public static String reverse(String str) that computes the reverse of a string. For example, reverse("f
    6·1 answer
  • What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
    11·1 answer
  • As the team leader, John ensures that all his teammates are clear in the team goals they need to achieve. He demonstrates the qu
    12·2 answers
  • Which choice lists two image formats that support transparency
    6·2 answers
  • Who where the romanovs? What happened to them ?
    7·1 answer
  • We can include following item(s) during configuration itemidentification:
    10·1 answer
  • Refer to the exhibit. A network administrator is configuring PAT on an ASA device to enable internal workstations to access the
    12·1 answer
  • Selective colleges choose to have in-person meetings to learn more about the applicants. These meetings are called:
    8·2 answers
  • What is Error Code: 232011
    11·2 answers
  • A friend asks you to look over the code for an adventure game and help figure out why it won’t work. Which of these options is s
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!