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
e-lub [12.9K]
3 years ago
15

Assuming that the user enters 45 and 62 as inputs for n1 and n2, respectively, what is the output of the following code snippet?

Computers and Technology
1 answer:
aev [14]3 years ago
8 0

Answer:

a) 4562

b) (a != b) || (a != c) || (b != c)

(a != b) && (a != c) && (b != c)

!((a == b) && (b == c) && (a == c))

Explanation:

a) The user input of 45 and 62 are received as a String (n1 and n2). Then result concatenate the value of 45 and 62 which is 4562. Result variable uses the concatenate operator '+'.

b)

(a != b) && (a != c) && (b != c) is correct as each of the individual condition must be true before it evaluate to true. Meaning a is not equals to b and a is not equals to c and b is not equals to c.

(a != b) || (a != c) || (b != c) is correct because it evaluate to true if at least one of the condition is satisfied.

!((a == b) && (b == c) && (a == c)) is correct because each individual condition is false and the logical combination of false and false and false equals false, then the negation of false is true

You might be interested in
Explain the role of computers in accounting
Inessa05 [86]

Answer:

A computer helps accountants store and access financial records, make changes and alleviate the need to keep paper files. If paper work is needed, computer files can easily be accessed and printed along with any changes the accountant makes at any given time.

8 0
2 years ago
Which button is used to open the Start menu in Windows Vista?
Karo-lina-s [1.5K]
The answer is B. Windows icon
4 0
3 years ago
Write a C console application that will be used to determine if rectangular packages can fit inside one of a set of spheres. You
MatroZZZ [7]

Answer:

#include <cmath>

#include <iostream>

using namespace std;

int getSphereSize(double length, double breadth, double height) {

   double diagonal = sqrt(length * length + breadth * breadth + height * height);

   if (diagonal <= 4)

       return 4;

   if (diagonal <= 6)

       return 6;

   if (diagonal <= 8)

       return 8;

   if (diagonal <= 10)

       return 10;

   if (diagonal <= 12)

       return 12;

   return 0;

}

int main() {

   double length, breadth, height;

   int sphereCounts[5] = {0};

   int sphereSize;

   while (true) {

       // Get dimensions of the box

       cout << "Enter the dimensions of the box:\n";

       cout << "Length: ";

       cin >> length;

       cout << "Breadth: ";

       cin >> breadth;

       cout << "Height: ";

       cin >> height;

       if (length <= 0 || breadth <= 0 || height <= 0)

           break;

       sphereSize = getSphereSize(length, breadth, height);

       if (sphereSize == 0)

           cout << "The box cannot fit in any of the spheres";

       else

           cout << "The box can fit in the " << sphereSize << "-inch sphere";

       // Increment the counter

       if (sphereSize == 4)

           sphereCounts[0]++;

       else if (sphereSize == 6)

           sphereCounts[1]++;

       else if (sphereSize == 8)

           sphereCounts[2]++;

       else if (sphereSize == 10)

           sphereCounts[3]++;

       else if (sphereSize == 12)

           sphereCounts[4]++;

       cout << "\n\n";

   }

   cout << "\nNumber of 4-inch spheres: " << sphereCounts[0];

   cout << "\nNumber of 6-inch spheres: " << sphereCounts[1];

   cout << "\nNumber of 8-inch spheres: " << sphereCounts[2];

   cout << "\nNumber of 10-inch spheres: " << sphereCounts[3];

   cout << "\nNumber of 12-inch spheres: " << sphereCounts[4];

   cout << endl;

   return 0;

}

Explanation:

The "cmath" library is included in the c++ program. The getSphereSize function is used to return the sphere size the rectangle dimension can fit into. It program continuously prompts the user for the length, breadth, and height of the rectangle and passes the values to the getSphereSize function in the while but breaks if any or all of the variable value is zero.

The sizes of the sphere objects in inches are collected in an array of five integer values of zeros and are incremented by one for every match with a rectangle.

7 0
2 years ago
Your company requires computers to authenticate to one another and enforces this requirement with Windows Defender Firewall with
lubasha [3.4K]

There are a lot of rules in computing. The above can be done with authentication exemption.

<h3>What is Authentication exemptions?</h3>

This is a method that helps one to be able to specify a particular group of computers.

Conclusively, This can be done via their Active Directory computer account name or the use of their IP address. Tis does not apply to existing connection security rules.

Learn more about   authentication exemption from

brainly.com/question/25739714

7 0
2 years ago
This code is supposed to accept a word as input, and then print that word to the screen.
atroni [7]

The thing that happens if you type a number instead of a word in the given code is: The number is printed

This is because the code already assigned a variable to the input and it accepts both numbers and alphanumeric keys because it is an integer command.

<h3>What is Coding?</h3>

This refers to the use of programming that is used to give instructions to a computer system

Hence, we can see that The thing that happens if you type a number instead of a word in the given code is: The number is printed

This is because the code already assigned a variable to the input and it accepts both numbers and alphanumeric keys because it is an integer command.

Read more about coding here:

brainly.com/question/16397886

#SPJ1

3 0
1 year ago
Other questions:
  • The prediction that the number of transistors on a chip would double about every two years is known as ________. Metcalfe's law
    6·1 answer
  • Write a sentence about a mineral you use and how you use it
    12·1 answer
  • A chef writing up her famed recipe for beef stew realizes she has switched parsley and oregano everywhere in the recipe. The che
    13·1 answer
  • A form’s height is ______________________.<br><br> A property<br><br> A method<br><br> An event
    10·1 answer
  • ________ consists of detailed, preprogrammed instructions that control and coordinate the computer hardware components in an inf
    11·1 answer
  • If we can lock a file, we can solve the race condition problem by locking a file during the check-and-use window, because no oth
    14·1 answer
  • A technician is assigned a task to configure a new server with six hard drives. The senior administrator requested the technicia
    13·1 answer
  • What can the tab key do
    10·1 answer
  • Several disaster relief nonprofits want to create a centralized application and repository of information so that they can effic
    7·1 answer
  • How does the computer help me with school work
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!