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
aleksley [76]
3 years ago
5

Given the following expressions, what value would they have in a C++ program?

Computers and Technology
1 answer:
mario62 [17]3 years ago
5 0

Answer:

The program of the given expressions can be given as  

Program:

#include <iostream>

using namespace std;

int main()                         //define main function.

{

float a,b,c,d,e,f,g,h;                     //define variable for hold values.

a=13 / 4;

cout<<"a:"<<a<<endl;           //print value.

b= 2 + 12 / 4;

cout<<"b:"<<b<<endl;       //print value.

c=21 % 5;

cout<<"c:"<<c<<endl;       //print value.

d=3 - 5 % 7;

cout<<"d:"<<d<<endl;      //print value.

e=17.0 / 4;

cout<<"e:"<<e<<endl;      //print value.

f=8 - 5 * 2.0;

cout<<"f:"<<f<<endl;              //print value.

g=4 + 5 % 2 - 3;

cout<<"g:"<<g<<endl;             //print value.

h=15.0 + 3.0 / 2.0;

cout<<"h:"<<h<<endl;            //print value.

   return 0;

}

output:

a=3.

b=5.

c=1.

d=-2.

e=4.25.

f=-2.

g=2.

h=16.5.

Explanation:

In the above expression, all the options follow the bodmos rules. All the expression explanation can be given as:

In option(a) we divide the value.It gives the quotient.

In option(b) we first divide the value and then addition.

In option(c) we Modulus the value. It gives the remainder.

In option(d) we first Modulus the value and then Subtract It.

In option(e) we divide the value.It gives the quotient.

In option(f) we first multiply the value and then Subtract It.

In option(g) we first Modulus the value, second addition than subtraction.

In option(h) we first divide the value and then addition.

You might be interested in
Students recently created a Gaming Club at their school. On Friday of every week, students bring in their gaming consoles (Xbox,
ozzi

Answer:

first line, that is "The bandwidth of the school’s internet connection is lower than at home" is the correct answer.

Explanation:

The network school bandwidth, speed, and list of phones can all be considerations here. In school might have a network that does not allow high MBPS or via its ISP, it might have a low bandwidth plan. It based on the router's size, frequency, and link of the firewall and gaming network, the bandwidth may be lower.

  • The Most probably, the device isn't the source but it acts in the match were caused by the link.
  • If the school requires the server for transport broadband connections, the network can slow the process through pc specifications and link to either the network.

8 0
3 years ago
Write a loop that continually asks the user what pets the user has until the user enters rock in which case the loop ends. It sh
mote1985 [20]

Loops are program statements that are repeated as long as the loop condition is true.

The loop in Python, where comments are used to explain each line is as follows:

#This initializes the number of pets to 0

count = 0

#This gets input for the pet name

pet = input("Pet: ")

#This is repeated until the user enters "rock"

while pet.lower() != "rock":

   #This increases the number of pets by 1

   count+=1

   #This prints the pet and the number of pets

   print("You have a",pet,"with a total of",str(count),"pet(s)")

   #This gets input for the pet name

   pet = input("Pet: ")

Read more about loops at:

brainly.com/question/19344465

6 0
2 years ago
The PICC team is scheduled to remove a PICC before client discharge. Assessment of the catheter indicates the PICC and determine
Alik [6]

Answer:

Stuck PICC is one potential complication, and it occurs when the catheter is not able to disengage while the removal process, and it cannot be removed out of the vein. And this is generally due to venospasm and it gets resolved as the time passes.

Explanation:

You should know that PICC stands for Peripherally inserted central catheter, and it is a thin, delicate and long tube or catheter, which is inserted inside the vein in the child's arm, neck or leg. And the tip of the catheter is being positioned inside a large vein which carries the blood inside the heart. A PICC line is applied for long-term intravenous antibiotics, medication or nutrition, and for drawing the blood.

4 0
3 years ago
If the fluid level in a battery is below the separators<br> should be added but never add
geniusboy [140]
Never add tap water to your battery. ... Battery electrolyte levels should be just below the bottom of the vent well, about ½ - ¾ inch above the tops of the separators. Never let the electrolyte level to drop below the top of the plates.
7 0
3 years ago
How desktop case or chassis designed?, material and steps?​
MariettaO [177]

They may require things such as plastic cut outs and glass depending if you want to be able to have a window to look into the pc. Some cases are 3D Printed although they have to be joined by screws at the end due to the fact that one whole print can take over a week and then it has to be well doesn't but looks better when sanded.

3 0
1 year ago
Other questions:
  • What is wrong with my code?
    7·1 answer
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    14·1 answer
  • Once a graph has been created, you would need to start over to make any changes to it?
    5·1 answer
  • A real-world problem that might be explained or predicted through the creation of a computer simulation
    7·1 answer
  • Which of these is not the correct method for moving text in a document in Word 2016?
    14·2 answers
  • Testing a function or program using test values that are at or near the values that change the outcome of the program is known a
    13·1 answer
  • what social media application that affect our day to day activities, and how did it improve our skill
    9·1 answer
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
  • A network of computers that provides access to information on the web.
    15·2 answers
  • Your client Mr. Smith has requested a reservation at Eleven Madison Park this evening for a party of 2 at 6PM. Unfortunately, th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!