What is the output of the code

Assignment Help C/C++ Programming
Reference no: EM131912911

What is the output of the following code if a and b have the following values

int a = 6, b = 4;

if (a + b < 10)

a = 5;

else

a = a + 1;

a = a + 2;

cout << a;

Reference no: EM131912911

Questions Cloud

Pregnant women deliver prematurely : Data from a large national study reports that 10% of pregnant women deliver prematurely. A local obstetrician is seeing 16 pregnant women in his next clinic.
Calculate npv and irr to formulate your decision : Net Present Value & IRR: Jekyll & Hyde Corp. is evaluating two mutually exclusive projects.
Prepare a horizontal analysis of the balance sheet : Prepare a horizontal analysis of the balance sheet and income statement, showing the percentage change from 2016 to 2017.
What is the standard error of the average house : What is the standard error of the average house price for a sample of 133 houses? (Use 4 decimals.)
What is the output of the code : What is the output of the code if a and b have the following values
Determine the cost of goods transferred out : The Matsui Lubricants plant uses the FIFO method to account. Determine the cost of goods transferred out and the ending inventory using the FIFO method.
Write an app to test class savings account : Write an app to test class Savings Account. Create 2 savingsAccount objects, server1 and server2, with balances $2000.00 and $3000.00, respectively.
Estimate the population mean starting salaries : Report the sample statistic that can be used to estimate the population mean starting salaries of all math science graduates at that university last year.
Write a program to meet the specifications of the companys : Write a program to meet the specifications of the companys request. Comments and headers to explain processing that is not obvious

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write program to calculate net pay for factory worker

Write and run a program in C++ that calculates the net pay for a factory worker. The program prompts the user for skill level and hours worked, as well as appropriate insurance and retirement options for the employee's skill.

  Write a class named employee with the class declaration

Write a class named Employee, with the class declaration in a file called Employee.h and the implementation in a file called Employee.cpp.

  Calculate the celsius equivalent of a fahrenheit temperature

Construct a program that allows you to calculate the Celsius equivalent of a Fahrenheit temperature.

  Supposed to swap numbers

The program is supposed to swap numbers, but I am stuck something is wrong! It does not swap them it repeats the second number, please help to fix! Thanks, this is in C++.

  Program to compute with two numbers.

I have the 1st two statements figured out, and had the arithmetic figured out based on results of 22 and 16, but turns out I interpreted it wrong and results should be what's posted above when the user changes the two numbers. The tutorial says no..

  Create a global array of structures

Create a global array of structures with the following data. Each structure should store the data (Employee Table - Name, age, salary information) . Array size must be at least 10

  Write equivalent compound statements

What action must be taken before a variable can be used in a program?

  Pixels down the right of the window

The blue and red values of the pixels across the top of the window are all the same, where the blue is at its maximum value while red is at its minimum value. The green values of the pixels down the right of the window are all the same, where gree..

  Discuss about the given two functions

Write a complete C++ program with the two alternate functions specified below, each of which simply triples the variable count defined in main.

  Write a function prototype

Determine the value, true or false, of each of the Boolean expressions - Write a function prototype and a function definition for a function.

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Statements that return container data only return container

Make sure all return statements that return container data only return container data.  If a return statement returns container data under certain conditions, but another return statement returns something that is not container data under other condi..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd