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
A physical cpu core without hyper-threading enabled can process two instructions at the same time.
diamong [38]

A physical CPU core without hyper-threading enabled can process two instructions at the same time is a false statement.

<h3>Can a CPU do multiple things at once?</h3>

Computers are those that do only one task (or process) at a single time. But a computer can alter tasks very fast and can do a lot of work.

The Central processing unit is known to be the brain of the computer system and without it, the computer cannot function or be turn on.

Hence, A physical CPU core without hyper-threading enabled can process two instructions at the same time is a false statement.

Learn more about CPU from

brainly.com/question/474553

#SPJ1

3 0
2 years ago
Look at the slide.
svetlana [45]

Answer:

c

Explanation:

5 0
2 years ago
Read 2 more answers
15)Which of the following statements is generally true about a V8 engine...
Vladimir79 [104]

Answer: Generally, there is an increase in power with a V8 engine.

Explanation:

A V8 engine has a bigger engine that cars with a V4 or V6 engines. They can go faster and gain speed at a faster rate than the other cars. They are not good on gas and use more gas than other cars with smaller engines.

Two things that are great about having a V8 engine is the torque and the power output. One of the most powerful engines with a V8 is a Dodge Challenger SRT. These engines are usually in bigger trucks and sports cars.

7 0
3 years ago
let m be a positive integer with n bit binary representation an-1 an-2 ... a1a0 with an-1=1 what are the smallest and largest va
Ahat [919]

Answer:

Explanation:

From the given information:

a_{n-1} , a_{n-2}...a_o in binary is:

a_{n-1}\times 2^{n-1}  + a_{n-2}}\times 2^{n-2}+ ...+a_o

So, the largest number posses all a_{n-1} , a_{n-2}...a_o  nonzero, however, the smallest number has a_{n-2} , a_{n-3}...a_o all zero.

∴

The largest = 11111. . .1 in n times and the smallest = 1000. . .0 in n -1 times

i.e.

(11111111...1)_2 = ( 1 \times 2^{n-1} + 1\times 2^{n-2} + ... + 1 )_{10}

= \dfrac{1(2^n-1)}{2-1}

\mathbf{=2^n -1}

(1000...0)_2 = (1 \times 2^{n-1} + 0 \times 2^{n-2} + 0 \times 2^{n-3} + ... + 0)_{10}

\mathbf {= 2 ^{n-1}}

Hence, the smallest value is \mathbf{2^{n-1}} and the largest value is \mathbf{2^{n}-1}

3 0
2 years ago
What kind of server is another computer that screens all your incoming and outgoing messages?
Rom4ik [11]
A proxy server
Hope i could help
8 0
3 years ago
Other questions:
  • Suppose that you created an robot that was so advanced it could act independently in very complex situations. It made its own de
    9·1 answer
  • Which option allows you to customize the order of your data ?
    8·2 answers
  • Which of the following is the correct ordering of operating systems, oldest to newest?
    5·2 answers
  • Write a program that ask the user to enter air water or Steele and the distance that a sound wave will travel in the medium the
    9·1 answer
  • What icons in the toolbar change the look of the presentation text? It’s either Drawing, Formatting,Presentation, or Standard
    9·2 answers
  • Compress<br> 00eb:0000:0000:0000:d8c1:0946:0272:879<br> IPV6 Address
    9·1 answer
  • Write a function longer_string() with two string input parameters that returns the string that has more characters in it. If the
    5·1 answer
  • Which of the following screen elements is a horizontal bar that displays at the
    8·1 answer
  • Dunbar's number, 150, refers to the number of:
    5·1 answer
  • The ____ file is typically saved with a prefix of inc_.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!