Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Instructions:

  • Using a do...while() loop, continuously scan for random integers that will be inputted by the user and print out its square, separated in each line.
  • Once the inputted value is 0, it will still print out its square value but should then terminate the loop afterwards. Use this concept in making your loop condition.
  • Use iostream only.

Sample Results:


Input


Multiple lines containing an integer.


2

6



Output


Multiple lines containing an integer.


4

36




Create a structure called fraction. It has two members, both type int, called numerator and



denominator. Write a program that input values in two variables of type fraction. Add both



fractions and print the result in fraction format.

Ask the use if they want a cup of tea. If they replay with “no” or “n” repeat the question. Once the loop stops display the message “Sorry,we have run out of tea”

Ask the user to input a number and then ask if they want to double the number. If they answer “y”multiply the number by 2 and display the answer. Keep repeating this loop, doubling their number each time, until they no longer reply “y”.

Average of the given numbers

Looping problem:-

Input two positive integers a and b from the user. Determine the remainder of a/b. Assume that the division and modulus operators are not available.


Looping problem:-

Input two positive integers a and b from the user. Determine the integer quotient of a/b. Assume that the division operator is not available.


Looping problem:-

Write an if-else statement that outputs the word "Warning" provided that either the value of the variable temperature is greater than or equal to 100, or the value of the variable pressure is greater than or equal to 200, or both. Otherwise, the if-else statement outputs the work "OK".


Three numbers denoted by the variables A, B and C are supplied as input data. Print these three numbers in ascending order.


Looping problem:

Multiply a number with the sum of its digits.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS