answer.
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
aniked [119]
2 years ago
14

Complete this truth Table. Write a program that you can enter from the keyboard, a 1 or 0 into three Boolean variables, A,B,C. W

rite an if statement that tests the condition ( (A or B ) and C ). Run the program 8 separate times, testing each of the following 8 combinations. Write the results below in the following truth table.
Module 9-Alternative Sequences and Complex logical Criteria v17 (1).pdf. Adobe Acrobat Reader DC
File Edit View Window Help
Home Tools Module 9 - Altema...X
A B C (A or B ) (A or B ) and C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Computers and Technology
1 answer:
SSSSS [86.1K]2 years ago
8 0

Answer:

Following are the code to this question:

#include<stdio.h>//defining header file

int AND(int x,int y) //defining a method AND that hold two variable in its parameter

{

if(x==1 && y==1)//defining if block to check x and y value is equal to 1

{

return 1;//return value 1

}

else //defining else block

{

   return 0;//return value 0

}

}

int OR(int x,int y)//defining method OR that hold two variable in its parameter

{

if(x==0&&y==0)//defining if block to check x and y value is equal to 1

{

return 0;//return value 0

}

else //defining else block

{

   return 1;//return value 1

}

}

int main()//defining main method

{

int a,b,c;//defining integer variable  

int k=1;//defining integer variable k that holds a value 1

while(k<=8)//defining while loop for 8 time input

{

printf("Please insert 3 numbers in (0 0r 1):\n ");//print message

scanf("%d%d%d", &a, &b, &c);//input value

k++;//increment the value of k by 1

printf("value: %d\n",AND(OR(a,b),c));

}

return 0;

}

Output:

please find the attachment.

Explanation:

In the above-given C language code two methods "AND and OR" is declared, holds two integer variable "x and y" in its parameters, inside the method a conditional it used that can be defined as follows:

  • In the AND method, inside a conditional statement, if block check x and y both value is same that is 1 it will return 1 or it will goto else block in this it will return value 0.      
  • In the OR method, inside a conditional statement, if block check x and y both value is the same, that is 0 it will return 0 or it will goto else block in this it will return value 1.
  • In the main method, four integers "a,b,c, and k" is declared in which variable "a, b, c" is used in the loop for 8 times input values from the user and print method is used to call the method and prints its return values.

You might be interested in
Cloud-based services can open doors to leveraging Artificial Intelligence (AI) without dramatically increasing risk. Which clien
vladimir1956 [14]

Answer:

Explanation:

The clients that would be best suited for this opportunity would be small business or business' that do not have the hardware/space resources necessary to create the computing power that they need. Instead, they can simply pay for these cloud-based services which provide all of the necessary computing/hardware power and resources necessary so that the company can easily fulfill all of their tasks without any problems. Bigger companies can easily pay for and implement their own hardware to solve their problems which may benefit them even more in the long-term.

7 0
1 year ago
Question 19 :Rachel, a database administrator, has created a database for her website. It contains pictures of vacations that pe
gavmur [86]

Answer:

The correct answer will be "Semi-structured data".

Explanation:

  • Semi-structured data comprise evidence that just isn't data collected in some kind of a traditional database management system, but then neither is content typed.
  • It's indeed descriptive information or structured data, but that's not organized into a theoretical design, like a chart or perhaps a graph centered through an entity.

So that the given scenario is the example of semi-structured data.

6 0
2 years ago
A system is always at some stage of SDLC because every request for structural changes requires retracing the steps of the System
mylen [45]

Answer:

The correct answer to the following question will be "True".

Explanation:

SDLC is a tool being used by the tech industry to plan, design and implements heavy-quality software. Its goal is to achieve high-quality software that equals or exceeds customer demand, to be delivered within time-frames and costings.

There are seven phases of SDLC such as:

  • Planning
  • Requirements
  • Design
  • Development
  • Testing
  • Deployment
  • Maintenance

The method seems to be at every point of the SDLC, as every proposal for modifications involves a retracing of the process steps.

Therefore, the given statement is true.

4 0
2 years ago
EVERYONE LISTEN!!!! PLEASE COPY THIS MESSAGE AND RESEND!!!!
slavikrds [6]
Ok we will do it for you cause they are very mean
4 0
2 years ago
Read 2 more answers
Which of the following statements is true regarding input and output?
GarryVolchara [31]

Answer:

Input is the raw data that is entered into the computer for processing.

3 0
2 years ago
Read 2 more answers
Other questions:
  • The piston engine uses the ________ to convert the reciprocating motion of the piston into rotary motion.
    13·1 answer
  • Mitchell has noticed that his co-workers are unable to open attachments in the emails he sends. What is one possible reason for
    5·1 answer
  • Which telecommunications device is widely used in industries that require closed communication?
    7·2 answers
  • A company wants to inform a select list of it's regular customers about a flash sale. Which type of platform will it use to send
    9·1 answer
  • Always refill your gas tank well before____.
    9·2 answers
  • In which job role would a course in 3D modeling help with professional career prospects?
    11·1 answer
  • B. Write a function that takes one double parameter, and returns a char. The parameter represents a grade, and the char represen
    7·1 answer
  • Object-oriented development could potentially reduce the time and cost of writing software because: Group of answer choices a) i
    5·1 answer
  • The X.500 standard defines a protocol for a client application to access an X.500 directory known as which of the following opti
    10·1 answer
  • Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!