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
In cell B20, enter a function to calculate the average attendance for 2018
coldgirl [10]

Answer:

=Average(Cell Range)

Explanation:

The function that is used to calculate the average value of a data set or the mean in Ms. Excel is;

AVERAGE function.

In the cell B20, Enter the function;

=Average

Then select the entire attendance for 2018 as the arguments of the function. Finally, press the enter key on your keyboard.

6 0
3 years ago
Write a function similar to keep_ints like before, but now it takes in a number n and returns a function that has one parameter
lukranit [14]

Answer:

def make_keeper(n):

   """Returns a function which takes one parameter cond and prints

   out all integers 1..i..n where calling cond(i) returns True.

   >>> def is_even(x):

       # Even numbers have remainder 0 when divided by 2.

       return x % 2 == 0

   >>> make_keeper(5)(is_even)

   2

   4

   """

   def fun(cond):

       for i in range(1,n):

           if(cond(i)):

               print(i)

   return fun

Explanation:

  • Define a function called fun that takes cond as input.
  • loop from 1 to n and display the value if it meets the requirement.
5 0
3 years ago
What is the keyboard shortcut to display the merge to printer dialog box?
sp2606 [1]
Alt + Shift + M are the keyboard shortcuts to display the merge to printer dialog box.
3 0
3 years ago
A man-in-the-middle attack or impersonation are likely to result in problems with
Ivan

Answer:

Data Confidentiality

Explanation:

A Man-In-The-Middle-Attack (MITM) is an attack when a hacker gets between a communicative situation and digitally eavesdrops.

6 0
3 years ago
You need to design a backup strategy. You need to ensure that all servers are backed up every Friday night and a complete copy o
cestrela7 [59]

Answer: (A) full backup

Explanation: A backup strategy is a term used to describe the various effective approach engaged in creating a backup for data or information.

A FULL BACK UP IS THE VARIOUS APPROACH AND SYSTEMS PUT IN PLACE BY A COMPUTER USER OR AN INFORMATION TECHNOLOGY EXPERT IN ORDER TO CREATE AN ADDITIONAL SAMPLE OR COPY OF AN INFORMATION OR A DATA IN S SINGLE BACKUP.

8 0
3 years ago
Other questions:
  • Which of the following represent typical account fees?
    7·1 answer
  • A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
    8·1 answer
  • The fossil record is usually incomplete due to the destruction of fossils.
    10·1 answer
  • Describe markings on a road that indicate that it is safe to pass.
    10·1 answer
  • Write a program which populates an array with integer values read from a file. We do not know how many integers are in the file,
    8·1 answer
  • What does cmyk stand for?
    5·2 answers
  • Write an expression that executes the loop while the user enters a number greater than or equal to 0.
    9·1 answer
  • What code would you use to create the login button?
    11·1 answer
  • Why does computer uses 0s and 1s to procress data​
    7·2 answers
  • 15. Question
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!