Questions: 5 831

Answers by our Experts: 5 728

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

10. Find the arithmetic mean of the negative elements in the list and find the smallest


replace with an item.

10. The Euclidean algorithm is the largest divisor of the numbers A and B.


trace in the report.

10. From the small Latin letters engraved with a dot at the end of each


The following text is provided. All rights reserved more than twice in the text


Print the letters.

10. How many letters are different in the literal value of 70 characters?


Create an existing detection program.

A large school categories its students as Year 1, Year 2, up to year 7. The school is interested in finding out  how many Year 1 students are taller than 135 cm and how many year 7 students are shorter than 175 cm.  Write an algorithm, in the form of a flowchart, which inputs the year number and height of all 1000  students. The output will be how many students in year 1 were taller than 135 cm and how many  students in year 7 were shorter than 175 cm. 




Igor lives in Russia and frequently travel to Singapore (time difference: + 6 hours), western Canada (time  difference: -10 hours) and India (time difference: + 3.5 hours). Write an algorithm, in the form of a  flowchart, which inputs the present time (using 24 hour clock) and the country he is visiting. The output  will be the time in the country he is visiting. 




Write a program to calculate the electricity bill. The rates of electricity unit are as follows:

⮚ If the units consumed are <=300, then the cost is Rs. 2 per unit

⮚ If the units consumed are >300 and <= 500 then the cost is Rs. 5 per unit. ⮚ If the units consumed exceed 500 then the cost per unit is Rs. 7

A line rent Rs. 150 is also added of 5% extra if the bill exceeds Rs. 2000. Calculate the total bill with all conditions given above.



Describe the difference between a chained conditional and a nested conditional. Give your own example of each. 


5. Survival of the Biggest

by CodeChum Admin

Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.

Think you can handle the job?


Instructions:

  1. Input a non-zero positive integer.
  2. Using the same concept as the previous problem, figure out how to separate the digits of a number and determine which of the digits is the largest one, using a while. Afterwards, print the largest digit.
  3. Tip #1: Create another variable that will hold the largest digit. Initial its value to a negative integer, like -1, outside the loop.
  4. Tip #2: Everytime you get the rightmost digit, check if it is greater than the current largest digit. If it is, set it as the new largest digit.


Input

A line containing an integer.

214

Output

A line containing an integer.

4




Describe the difference between a chained conditional and a nested conditional. Give your own example of each. 


LATEST TUTORIALS
APPROVED BY CLIENTS