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
aniked [119]
3 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]3 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
You have recently installed Windows Server 2019 Desktop Experience on a server. Your manager informs you that he needs to extens
Korolek [52]

To meet the manager requirement, you need to format the server, then after that install Server Core. This process is now followed by rebooting the server in the Server Core mode.

<h3>How do you install a Windows server?</h3>

Whenever you want to install Windows Server by using setup wizard settings, you have the choice of installing Server Core or Server with a graphical user interface known as the Desktop Experience installation method.

Since the GUI is not usually installed with Server Core; you control the server via the command line by using:

  • PowerShell,
  • The Server Configuration tool (SConfig), or
  • Remote methods. 

Now, if your manager informs you that he needs to extensively use the command line and PowerShell but not the use of graphical interface, the best way to meet the requirements are:

  • Format the server and install server core
  • Reboot the server in the Server Core mode

Learn more about Windows server installation here:

brainly.com/question/26175904

5 0
2 years ago
When constructing policies regarding data _______________, it is important that these policies offer particular guidance on sepa
Rama09 [41]

Answer:

access

Explanation:

Managing users' access rights to digital resources within the organization's environment is a fundamental SoD control. As more services are requested by users, utilizing the built-in panels to check compliance with internal controls might become excessive. Companies require a comprehensive Identity Governance and Administration plan to monitor these user access and offer an authoritative source of identity definitions in order to ensure  SoD compliance.

6 0
2 years ago
If a while loop iterates forever,what is the most likely cause?
miv72 [106K]

Answer:

Runtime error probably. The program won't make it past the while loop in the code.

5 0
2 years ago
What is mark in in premiere pro
Studentka2010 [4]
Markers are an often underutilized tool in the Premiere Pro CC toolbox. They are little colored tabs you can apply to both your timeline and your source clips to indicate important points in time with a color or note.
5 0
3 years ago
Answer if you play PS4 apex legends if you do answer username and first to answer is brainliest
Vinil7 [7]

Answer:

I do not, sorry

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which statements describe molecules
    12·1 answer
  • In this assignment, you are going to add conditional formatting to the spreadsheet you used in the previous
    13·1 answer
  • What tab must you click on to view any previously read messages from instructors in the message center?
    14·2 answers
  • HI GIVING BRAINLIEST Tyra used the software development life cycle to create a new game. She released it to her friends in order
    14·2 answers
  • What is an example of CT SO?
    9·1 answer
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • Add me on f0rtnite <br> (Tsarbacon)
    9·2 answers
  • What is the different sheets in excel
    15·1 answer
  • Im coding and need help please answer or comment to help. any skilled coders comment below
    12·1 answer
  • What represents a user’s specific preferences?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!