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
kaheart [24]
3 years ago
12

Given these values for the boolean variables x,y, and z:

Computers and Technology
1 answer:
Mumz [18]3 years ago
7 0

Answer:

1. True.

2. False.

3. True.

4. True.

Explanation:

Remember OR operator (||) gives false when both of it's operands are false. AND Operator (&&) gives false when even one of it's operator is false.

In first part we have  

!(True || False) || True

=!True||True

=False||True

=True

In second part we have.

False && True && True

= False && True

=False.

In Third part

! True || (False || True)

=False || True

=True.

In fourth part

True || True && False

=True|| False

=True.

You might be interested in
Write a program that reads raw data from a file that contains an inventory of items. The items should be sorted by name, and the
Anika [276]

Answer:

//C++ code

#include<iostream>

#include<fstream>

#include<iomanip>

using namespace std;

/*===============================================*/

// a structure called prod

struct prod

{

string name;// – a string, assumed to have no spaces

double price; // –adollaramount

int inStock; // – the number of items currently in stock.

};

//Fucntion Prototypes

void readInventory(prod products[], int& size);

/*===============================================*/

/*returns: a dollar amount, the total value of the inventory*/

double totalValue(prod products[], int size);

/*===============================================*/

// Sorts the given array by name

void sort(prod products[], int size);

/*===============================================*/

/*a report to a file called “report.txt”.

When the file fails to open, print

“Unable to open output file.” and end.*/

void writeReport(prod products[], int size);

/*===============================================*/

//Function definitions

/*===============================================*/

void writeReport(prod products[], int size)

{

ofstream outfile("report.txt");

outfile << fixed << setprecision(2);

if (!outfile)

{

cout << "Unable to open output file.\n";

return;

}

outfile << "+------------------------------+\n | Current Inventory |\n\

\n+------------------------------+\nNAME PRICE #\n\

\n-------------------- ------- ---\n";

for (int i = 0; i < size; i++)

{

outfile << products[i].name << " " << products[i].price << " " << products[i].inStock << endl;

}

outfile << "+------------------------------+\n";

outfile << "Number of products: " << size << endl;

outfile << "Inventory total value: " << totalValue(products, size) << endl;

cout << "Report written to file\n";

//close the output stream

outfile.close();

}

/*===============================================*/

void sort(prod products[], int size)

{

for (int i = 0; i < size; i++)

{

for (int j = i+1; j < size; j++)

{

if (products[i].name > products[j].name)

{

//swapping

prod temp = products[i];

products[i] = products[j];

products[j] = temp;

}

}

}

}

/*===============================================*/

double totalValue(prod products[], int size)

{

double total = 0;

for (int i = 0; i < size; i++)

{

total += products[i].inStock * products[i].price;

}

return total;

}

/*===============================================*/

void readInventory(prod products[], int& size)

{

// Open a file called “inventory.txt”

//and read the data from the file into the partial array

//.If the file fails to open,

//print “Unable to open input file”

//and set the number of products to 0.

size = 0;

ifstream inFile("inventory.txt");

if (!inFile)

{

cout << "Unable to open input file.\n";

return;

}

string name;

double price;

int qunatity;

while (inFile >> price >>qunatity >>name)

{

if (price != -1 && qunatity != -1 && name != "endofdata")

{

products[size].name = name;

products[size].inStock = qunatity;

products[size].price = price;

size++;

}

}

cout << "inventory read\n";

//close the stream

inFile.close();

}

/*===============================================*/

int main()

{

//declares a partial array of products

prod products[100];

int size;

// invokes readInventory()

readInventory(products, size);

// invokes sort()

sort(products, size);

// invokes writeReport()

writeReport(products, size);

// ends with the standard system pause.

system("pause");

return 0;

}

please see attachment for inventory text and output.

4 0
3 years ago
What are some of the ways you can use bitlocker encryption? (choose all that apply?
nasty-shy [4]
Bitlocker Encryption can be used during the process of authenticating your computer with a TPM, during the process of authenticating your account with a USB flash drive, and most of the authentication through text messages.
3 0
3 years ago
While reviewing the Quick Access toolbar, Sarah notices that the Redo button is not there. This is because the Redo button only
IRISSAK [1]
D is the best answer
I hope it’s work
8 0
3 years ago
If you wish to sign out of your Microsoft account, tap or click ____ on the ribbon to open the Backstage view and then tap or cl
lyudmila [28]
If you wish to sign out of your Microsoft account, tap or click file on the ribbon to open the Backstage view and then tap or click the Account tab to <span>display the Account gallery, and tap or click the Sign out link. There are different ways to do that but it is the easiest.</span>
7 0
2 years ago
25% of 60 min<br> 20% of 60 min<br> 33%% of 60 min
Alexxx [7]
15
12
19.8 cool cool cool
7 0
2 years ago
Other questions:
  • Which of the following statements is true of a database? a. It is a collection of unstructured data. b. It is accessed primarily
    14·1 answer
  • Why is the stateless nature of the internet a problem for shopping cart software? g?
    5·2 answers
  • Which company operates a public cloud?<br><br> Lotus<br> Acme<br> Google<br> Symantec
    5·2 answers
  • Reasons for the growth of decision-making systems include:
    13·1 answer
  • You work in the Accounting Department and have been using a network drive to post Excel workbook files to your file server as yo
    9·1 answer
  • Which of the following statements is false? a. InputStream and OutputStream are abstract classes for performing byte-based I/O.
    7·1 answer
  • What does ctto mean?
    11·2 answers
  • Which statement best describes what happen to the temoporary working memory (RAM) of a computer when it shut down
    12·2 answers
  • Science can give us
    5·2 answers
  • Convert octal number 2470 to decimal number
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!