Questions: 11 448

Answers by our Experts: 10 707

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

what is the index of the second element of an array


what is the index number of the last element of an array of size 20


Using do while loop, write a C++ program that will compute and display the square roots of the 30 even positive integers starting from 100.



Output:

Square Root of 100: 10

Square Root of 102: 10.0995

Square Root of 104: 10.198

Square Root of 106: 10.2956

Square Root of 108: 10.3923

Square Root of 110: 10.4881

:

:


write program to ask user to enter 4 numbers and the output the main of thes mumbers,this program should only use 2 varible


Write a program that shows a traffic light simulation along with road path in c++


3. Negative Allergy


by CodeChum Admin



Whole numbers are great, but I think we should also pay attention to decimal numbers, too.





So, how about we make a program that involves a lot of decimals?







Instructions:



Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.


The loop shall only terminate for the following reasons:


A negative decimal number is inputted (but still included in the total sum)


The total sum reaches 100.0 or more


Input



Multiple lines containing float number on each.



1.1


1.2


1.3


1.4


-1.0


Output



A line containing a float number with two decimal places.



4.00

2. Against All "Odds"

by CodeChum Admin


Looping numbers is fun, but it's even more exciting when we combine complex tasks to it, just like looping through a series of numbers and performing a series of code only to special numbers, like odd ones! And today, we're going to do just that.




Are you ready?






Instructions:


Input a random positive integer. This will serve as the starting point of the loop.

Using a while() loop, print out all the odd numbers starting from the inputted integer, until 0. The outputted numbers must all be separated by line.

Input


A line containing an integer.


10

Output


Multiple lines containing an integer.


9

7

5

3


Write a program that reverses the number entered by the user. Formulate

an equation to come up with the answer. (Hint: You are going to use the modulus

operator.)

Sample Output:

Enter a number: 1234

Number in reverse: 4321


Create a program using the while statement that displays the numbers 0

through 117, in increments of 9.


The FizzBuzz Game





by CodeChum Admin





Let's play a game of FizzBuzz! It works just like the popular childhood game "PopCorn", but with rules of math applied since math is fun, right?






Just print out "Fizz" when the given number is divisible by 3, "Buzz" when it's divisible by 5, and "FizzBuzz" when it's divisible by both 3 and 5!






Let the game begin!






LATEST TUTORIALS
APPROVED BY CLIENTS