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

  Write a header for the pow function

Write a header for the pow function that returns a double and takes two parameters a double named base and an integer named exp.

  Complete the 8 queens 2 dimensional array

Complete the 8 queens 2 dimensional array program with backtracking. please change the below program using backtracking  and please run before posting it . the program suppose to print 92 solution . amd also comment before each line to better unde..

  Q1 write a menu-driven program that maintains an address

q1. write a menu-driven program that maintains an address book using a linked list. the address book must supports the

  Coinflip to prompt for and input a number

Write a program and name it CoinFlip to prompt for and input a number of times to flip a coin, then to output the number of "heads" and the number of "tails" that were flipped.

  Write a method, to be included in a template unsorted list

Write a metho, to be included in a template unsorted list class, called replace_item, that will receive two xType parameters, one called olditem, the other called newitem.

  Write a c program to compute dr if f1=50 lb and f2 = 4000

make a program for:A hydraulic lift as shown below from fluid mechanics, it can be shown that a small force F1     acting over a piston of diameter D 1    can be multiplied into a large force   F 2    acting over a piston of diameter D 2  .

  Write a script that creates a craps game

Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6.

  Write program in c++ for cosx and sinx expansion

Write program in c++ for cosx and sinx expansion( for personal inputs are x,number of terms

  Define a static method samecolor in the car class

Write an abstract class Car to implement the Comparable interface. Write a Truck class and a Sedan class to implement Car. define a static method sameColor in the Car class to find out weather a Truck and a Sedan has the same color.

  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

  What does the term polymorphism mean

What does the term polymorphism mean and Use case models use two patterns - "Common Sub Behavior" and "Interrupts as Extensions." Explain these two patterns in your own terms and give an example for each pattern.

  Ansi-c program complete assignment as per written in the

complete assignment as per written in the attached

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