What is the output

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

Question - Consider x=2 and y=3. show the output, if any, of the given code.

What is the output if x=3 and y=2?

What is the output if x=3, and y=3?

if (x>2)

if (y>2)

{

int z=x+y;

cout << "z is "<<z << endl;

}

else

cout << "x is " << x << endl;

This one is complex and I don't know how to do it

Reference no: EM13713120

Questions Cloud

Find the impulse on the ball during its collision : You throws a ball with mass 0.40 kg against a brick wall. It hits the wall moving horizontally to the left at 30 m/s and rebounds horizontally to the right at 20 m/s. Find the impulse on the ball during its collision with the wall.
State the inductive hypothesis : Prove the given statement using mathematical induction - State the inductive hypothesis
Write a function to convert the two dimensional coordinates : Write a function to convert the two dimensional coordinates of a point from Cartesian system to polar system by using x and y as its parameters, returning r and using references to pass theta value.
Find the rockets velocity change during given time interval : At time t=0, a 2150-kg rocket in outer space fires an engine that exerts an increasing force on it in the +x-direction.  By how much does the rockets velocity change during this interval.
What is the output : What is the output - This one is complex and I don't know how to do it
Write a program that computes the amount of money : Write a program that computes the amount of money the computer club will receive from proceeds of their granola bar sales project.
Write a function to compute the volume of a cone : write a function to compute the volume of a cone by using the base radius r and the height h of the cone as the parameters of the function Vcone = xr^2h/3
Calculate area and length of the boundary of field : Define a class called Plot that has private members of length and width. Include a constructor and a public function that calculates the area and the length of the boundary of the field.
Write a program that can be used to convert meters : Write a program that can be used to convert meters to feet and inches. Allow the user to enter a metric meter value in a method.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  A program computes and displays the number of centimeter

The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.

  Write a statement to call the function

Write an if statement that will assign 7 to p if the variable q is outside the range 100 through 1000. (Use single spaces between operators, operands and statements)

  Program - cosc

Assignment is based on Programming Exercise - The input file has the needed data on a single line. There is text as well as the numerical inputs.

  Write program to perform add-drop-list and update functions

Write C++ program to do add, drop, list (in last name / first name sorted order or id) and update functions. separate UI from data processing use object programming method multiple files

  A text file students.txt contains student records

A text file students.txt contains student records (name, date of birth, and GPA). Write a program that reads student records from students.txt and creates an array of student structures

  Assignment 1 boxing amoebadevelop a two dimensional

assignment 1 boxing amoebadevelop a two dimensional interactive game with the following features1.use opengl any

  Using an abstract class with only pure virtual functions

Using an abstract class with only pure virtual functions, create three small classes unrelated by inheritance---clases Building, Car and Bicycle. Give each class some uique appropriate attributes and behaviors that it does not have in common with oth..

  Write a function that accepts an int array

The task calls for: Write a function that accepts an int array and the array's size as arguments. The function should create a copy of the array, except that the element values should be reversed in the copy. The function should return a pointer t..

  Describe the three ways a client

Describe the three ways a client can reference a name from a namespace in C++ and what are the arguments for and against the C++ policy on inlining of methods?

  Write a recursive function squares

Write a recursive function squares that takes a list of numbers, and returns a new list of the squares of those numbers.

  Define the class bankaccount

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder's name (string), account number (int), account type (string, checking/saving), balance (double),..

  Multiply a set of complex numbers

Write a C program to multiply a set of complex numbers stored in an array (that has been dynamically allocated). Specifically, first prompt the user to enter how many complex numbers need to be multiplied, dynamically create an array to store the ..

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