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

  Implement a graphics system that has classes

Implement a graphics System that has classes for various figures: rectangles, squares, triangles and circles. A rectangle has data members height, width, color , and center point. A square has center point and an edge and color

  Design and implement a c program and structure diagram for

design and implement a c program and structure diagram for the subsequent specification.show writing and calling

  Create a program that contains 4 methods

Create a program that contains 4 methods / functions... main(), getTestScores(), calcAverage(), and displayAverage(). The main() method should call the getTestScores() method to get and return each of 3 test scores.

  Variables should be private and the class functions public

All the class variables should be private and the class functions public. The class functions should be implemented in a file Inventory.cpp which should be linked with the inventory.hpp file.

  Write a c program that copies the contents of one file

write a c program that copiest the contents of one file to a destination file. This program works by first prompting the user for the name of the source file and destination file.

  Prepare a function called perfect

Prepare a function called perfect(NUM) that determines if parameter NUM is a perfect number. Use this function in a program that determines and prints all the perfect numbers between 1 and 1000.

  Print out contents of the vector

Write C++ program to provide the subsequent functionality - Ask users to enter 10 integer numbers and Print out contents of the vector.

  Assign passed value to function to return value

Assign passed value to this member and another function to return value. Your main should read the integer from an input data file, and write the output to the output data file.

  Class named realestate that has data members

Create a class named RealEstate that has data members to hold the price of a house, the number of bedrooms, and the number of baths. Member functions include overloaded insertion and extraction operations

  Write a program with three functions

Write a program with three functions: upper, lower, and reverse.

  Prompts the user to input the shipping cost per liter

Write a program that does the Prompts the user to input the dimensions (in feet) of the container (radius the container (radius of the base and the height)

  Design and implement a class called cheetah

Create a method that calculates the time required to travel between the starting point and stopping point of the line based on a given speed.

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