Questions: 9 913

Answers by our Experts: 9 913

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

Melokuhle is a very young intelligent and adventurous individual. He has recently 

bought 4 quantums (taxi) to transport people around the country. As a result, he is 

planning a trip to Upington. 

Therefore, he has hired you to write a program in pseudocode as well as in C++ to 

evaluate the fuel consumption on his 4 cars during the planned trip. The kilometers

and fuel level in the tank at the start and end of the journey should be entered by the 

end-user. 

Calculate for each car, the fuel used, kilometers traveled, and the overall fuel 

consumption in kilometers traveled per litre of fuel


Rewrite the following for-loop as a post-test do-loop. (5)

for x = 20 to -20 step -3

display "x = ", x

next x


Rewrite the following for-loop as a pre-test while-loop. (6)

for x = 1 to 10

for y = 10 to x

if y MOD 2 = 0 then

display "*"

else

display "#"

endif

display " " ~newline


Determine the exact output that is produced when the following code is executed.


for x = 1 to 10 step 1


for y = 1 to x step 1


if y MOD 2 = 0 AND x MOD 2 <> 0 || y MOD 2 <> 0 AND x MOD 2 = 0 then


display "*"


else


display "#"


endif


next y


display " " ~newline


next x


Input:

staff name, the amount of loan, Year of Installment = 2 Process:

Do the decision

if (amount of loan < 5 000)

interest = 2

else if ( 10 000 < amount of loan >= 5 000)

interest = 2.5 else

Display “Invalid input. The maximum amount is RM10000”

interest = 0 Calculate Total of Interest

= (interest/100) * amount of loan

Calculate the Total Loan with Interest = amount of loan + Total of Interest

Calculate the monthly installment

= Total Loan with Interest / (Year of Installment * 12)

Output:

staff name, the amount of loan, monthly installment.


Write a program that takes an array ‘A’ of size 10 and an integer ‘x’ as input and searches the index of ‘x’ in the array. If ‘x’ is found, print the index. If ‘x’ is not found, then print -1. If ‘x’ is present two or more than two times in the array, then print the index of last occurrence of ‘x’.

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!








Input








A line containing an integer.








15






Output








A line containing a string.








FizzBuzz

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!

Input

A line containing an integer.

15

Output

A line containing a string.

FizzBuzz






Create a c++ program that would ask the user to enter their personal information : Lastname, First name, Middle Name, Birthday, Age, Gender and Permanent address. The program must display all the information input by the user.




write the class graduating student as a subclass of the student class


LATEST TUTORIALS
APPROVED BY CLIENTS