1 / 4

5. Write a program that will convert the time given in milliseconds into these format

1. Write a program that calculate the value of X to the power of Y; prompt user for the BASE and then the POWER; when user input 2 and then 3, the result must be 2 to the power of 3 which is 8.

shana-logan
Download Presentation

5. Write a program that will convert the time given in milliseconds into these format

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1. Write a program that calculate the value of X to the power of Y; prompt user for the BASE and then the POWER; when user input 2 and then 3, the result must be 2 to the power of 3 which is 8. 2. Write a program that calculate the average of a series of values. The user can specified any length for the series.

  2. 3. Ah Beng save RM500 in his bank account every year and the bank pay him interest of 4% per annum on daily compound basis. Write a program that will calculate the balance of his account at a specific period of saving in year basis. 4. Write a program that take input of an integer and print out the number of digit that form the integer. Example, if user input 4132, your program will print 4. If user input 37, the output is 2. The maximum value of an integer in computer memory is 32bits = 4294967296 (10 digits)

  3. 5. Write a program that will convert the time given in milliseconds into these format hour : minute : second : millisecond Example if given 7395456 milliseconds The output is 2:3:15:456 6. Write a program that can take in a series of number of any length specified by user and find out the smallest and the largest number in the series.

  4. 7. Write a program that can take in score (0-100) of any number of students and then find out the percentage of students which are categorized as Execellent (100-80), Average (79-45), Poor (0-44) User enter a negative score to indicate the end of the student list. 8. Write a program that can print out the calendar with input of the year and the day of a week for the first day in that specified year. [BONUS ]

More Related