Output of the given c++ code

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

Question: What is the output of the given C++ code?

if (x < 20 && y > 20);

{          

    x = 2 * x;

y = y / 2;

cout << x << " " << y << x - y << endl;

}             

else

{

x = y / x;

cout << x << " " << y << " " << x * x + y * y << endl;

You need to find out the output of the given code.

 

Reference no: EM13698742

Questions Cloud

Find the area of the circle : What is the ratio of the areas of the inscribed circle to that of the unit square -
Matlab code to create the global stiffness matrix : Write a MATLAB code to create the global stiffness matrix for a problem with 6 unconstrained degrees of freedom for any linear elastic two dimensional trusses.
Determine a regular language : Exhibit an algorithm for determining whether or not a regular language L contains any string w such that wr ? L.
Draw the structure of the organic compound : Question- Amino acids can be synthesized by reductive amination. Draw the structure of the organic compound that you would use to synthesize isoleucine. Draw the molecule with ionizable groups in their unchanged form. Do not consider sterochemistr..
Output of the given c++ code : What is the output of the given C++ code - You need to find out the output of the given code.
Calculate the osmotic pressure of each starting solution : Question- One-hundred milliliters of 1.75 mM NaCl is mixed with 80.0mL of 3.20 mM MgCl2 at 20 degrees Celsius. Calculate the osmotic pressure of each starting solution and that of the mixture, assuming that the volumes are additive and that both s..
What is the size of the key in the des : What is the size of the key in the DES(DATA ENCRYPTION STANDARD) algorithm?
What is the equilibrium constant at 298k for the reaction : Question- 3C(s) + 3H2(g) -----> C3H6(g) deltaH= 20.41 kJ; deltaS= -131.6J/K at 298K, What is the equilibrium constant at 298K for this reaction
Which logic equations should be valid : Which one of the subsequent four logic equations would be valid for the o6 output of a decoder with address lines a0, a1, a2 and outputs o0, o1, o2, o3, o4, o5, o6, o7?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Unit conversions

Unit Conversions. The following problem generate tables of unit conversions. Include a table heading and column headings for the tables. Choose the number of decimal place based on the values to be printed.

  Write code that declares an int array named month

Write code that declares an int array named month with 5 rows and 7 coloumns and initializes every element to -1.

  Add a sentinel command to stop the loop

add a sentinel command to stop the loop. When the program is compiled, It'll ask the user to type in a palindrome. I want the user to type EXIT to end the loop.

  The process function will then need

The process function will then need to find the time the person waited by calling the time function and finding the difference between the start and end timestamps. Save this time to an accumulator so that in the end you can find the average wait tim..

  How the function delete can be implemented for arrays

Explain in details how the function Delete() can be implemented for arrays to function exactly as it would with lists. Use pseudo code to clarify your explanation.

  Develop data structures - chord system

Develop data structures which are suitable to hold required information for each peer in a CHORD system. Note that index nodes can hold local information only

  Develop a two dimensional interactive game

The player starts as a disk, but can "morph" (that is expand and contract) in selected directions

  Create a text-based, menu-driven program

Create a text-based, menu-driven program that allows the user to choose whether to add, subtract, multiply or divide two numbers. The program should then input two double values from the use

  Compare the running time of two versions of the insertion

implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000. Try to use insertion sort to sort them. Compare the running time of two versions of the insertion sort.

  Determine the manner in which each of the provided concepts

Provide a short code example of the use of C++ syntax within the context of an employee database and determine the manner in which each of the provided concepts relates to the concept of object-oriented programming.

  Design class for textbook-data field for grade level of book

Design a class named TextBook that is child class of Book. Include new data field for grade level of book. Create a displayTextBookInfo () method so that you can accommodate new grade-level field.

  Write function to find whether number is perfect number

Write down the function perfect which determines whether number is perfect number or not. This function must receive number and return true if number is perfect.

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