Posted at 01:34h
in
Uncategorized
by admin
Question:
write a program to ask user about the date(year, month and day), then calculate the day of the year.
Sample input:
Year: 2016
Month: 6
Day: 23
Sample output:
Day of the year: 175
Hint:
You need consider leap years and non leap years, in order to do easier calculation, you may...
Posted at 01:32h
in
Uncategorized
by admin
Question 1.
Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
Sample Input:
Which multiplication table would you like? 5
Sample Output:
Here’s your table:
5 x 1 = 5
5 x 2...
Posted at 01:30h
in
Uncategorized
by admin
Question:Create a Time class and initialize it with hours and minutes.
Make a method addTime which should take two time object and add them. E.g.- (2 hour and 50 min)+(1 hr and 20 min) is (4 hr and 10 min)
Make a method displayTime which should print...
Posted at 01:18h
in
archives
by admin
Problem Description
A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below:
For example, the point A, which is at coordinates (12, 5) lies in quadrant 1...
Posted at 15:59h
in
archives
by admin
Question:
Continue to program the code so the back(<-) button and change sign(+/-) button can work:
when you click the back button, it will delete the last digit or decimal. However if there's only one digit left and that digit is not 0, it will change into...
Question:Jack is depositing money! Every year, Jack puts N coins into his bank account. At the end of each year, Jack’s investments will grow by P percent, rounded down to the nearest coin. After Y years, he would like to have at least T coins in his bank account so that he can buy some...