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]
4 years ago
5

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

Computers and Technology
1 answer:
mario62 [17]4 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
WILL GIVE BRAINLIEST!!!!!!!
Sedaia [141]
The answer is true !!!
4 0
3 years ago
Where are the Add Level and Delete Level buttons located? Filter options list Sort &amp; Filter group Sort dialog box Custom fil
BaLLatris [955]

Answer:

Sort dialog box

Explanation:

Sort dialogue box is used to sort data in Excel.

The add level Adds another row to the dialog box so additional columns can be sorted while the delete level removes any unwanted level. How to access it: Press the down arrow beside the sort order tab. Tap the button "The Largest to Smallest". Tap the Add level button.

6 0
3 years ago
Define the acronym WAECUP and its components
Mariana [72]

WAECUP stands for waste, accident, error, crime, and unethical practices.

Assuming that the components are the same as what's included in the acronym, that should be your answer.

Hope this helps!

8 0
3 years ago
To edit the text in a smartart graphic, what must be done first ?
ICE Princess25 [194]
C Hope this helps :D
8 0
3 years ago
Read 2 more answers
What is your F O R T N I T E name
kolbaska11 [484]

Answer:

don't have name, but would be something cool.

Explanation:

poor, have a splendid day.

6 0
3 years ago
Read 2 more answers
Other questions:
  • A. When executing System.out.println(a1), the toString() method in the Object class is invoked.
    14·1 answer
  • For an IP or device that is in the local network, it's a very straight forward cache table lookup for its MAC address. How does
    5·1 answer
  • If Johanna wants to label the x- and y-axes in Excel she should click Layout, then what?
    12·1 answer
  • What is the output of the following program? #include using namespace std; class TestClass { private: int val; void showVal() {
    5·1 answer
  • Which statement describes borders and shading ?
    13·1 answer
  • What is an objective of state-sponsored attackers?
    11·1 answer
  • What is the value of variable num after the following code segment is executed?
    5·1 answer
  • The purpose of multivariate analysis in index construction is to discover the simultaneous interaction of the items to determine
    12·1 answer
  • What is the term for the era created by the digital revolution?<br>​
    13·1 answer
  • Which is the first computer brought in nepal for the census of 2028 B.S​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!