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 parking garage charges a $2.00 minimum

A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $0.50 per hour for each hour or part thereof over three hours.

  Write a method that accepts a string

Write a method that accepts a String object as an argument and displays its contents backward. For instance, if the string argument is "gravity" the method should display - "ytivarg". Demonstrate the method in a program that asks the user to input..

  Wrtie a function called gen_rand_double_array

Wrtie a function called gen_rand_double_array that generates 900 samples of size 22500 random numbers from U(10, 12). For each of these 900 samples, write a main funciton that calculates the mean and finds the simulated probability that the mean is b..

  Program to remove comments from the program

A C++ program that asks the user to enter a name of a file containing a C++ program - Program reads the file and produces an output that deletes all comments beginning with // and comments between /* */

  Write c function to sort one dimensional integer array

Consider the values sorted in the array. Sort it in ascending order using Bubble sort technique showing all iterations: write C function to sort one dimensional integer array in ascending order.

  Write a program that will input letters grade(a,b,c,d,f)

Write a program that will input letters grade(A,B,C,D,F), the number of which is input by the user (a maximum of 50 grades). The grades will be read into array. A function will be called five times(once for each letter grade) and will return the tota..

  Implement a class to represent a matrix

Implement a class to represent a matrix. While doing this exercise, you are allowed only to use C++ primitive types and arrays. You may not use STL in your Matrix definition. You must use dynamic memory.

  Write a program to make the ssds function

Write a program to make the SSDs function as a MM:SS real-time clock. Hint: You must not use a single delay routine for the one second delay because that will not allow for persistence of vision. The displays need to be constantly refreshed during ev..

  Calculate the total of a purchase from a farmer''s market

You will develop a program that can calculate the total of a purchase from a farmer's market that sells apples, bananas, and oranges. At this particular market, apples are $1.99/lb., bananas are $0.99/lb., and oranges are $1.50/lb. Users should be..

  Create a function in c++ that subtracts two vectors

Create a function in c++ that subtracts two vectors. The function returns a vector than can also be negative.

  Write a complete c++ program

The main program will read in a parameter value n (read this in main). Then it will call a function read2arrays (details below) to read lists of grades into two arrays, which the main program will call test1 and test2 (or some other names of your ..

  Calculates the average of numbers

Write a C program which takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers. Output of the program should look like this;

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