[solved] – Question 85622

Create a calendar program that allows the user to enter a day, month and year in three separate variables. Then ask the user to select from a menu of choices using this formatting:

Please enter a date
Day:
Month:
Year:

Menu:
1) Calculate the number of days in the given month.
2) Calculate the number of days left in the given year.

It must include the following functions:
leap_year: Takes the year as a parameter and returns a 1 if a year is a leap year (Links to an external site.)Links to an external site.and 0 if it is not. This information will only be used by other functions.

number_of_days: This subprogram will accept the date as parameters and return how many days are in the given month (Links to an external site.)Links to an external site..

days_left: This will accept the date as parameters and then calculate the number of days left in the year. This should not include the date the user entered in the count.

Expert Answer


[solved] – Question 8567

I have to write a test class for a program and a counter class, its a course work in my university. I’m in my first year, so it may not be as complex for you guys as it is for me. I wanna know like how much it’ll cost to do this?, like an approximate value

Expert Answer


[solved] – Question 85679

Write a program that accepts a time as an hour and minute. Add 15 minutes to the time, and output the result.

Expert Answer


[solved] – Question 857

Describe an algorithm that computes the roots of a quadratic equation and display the roots.

Expert Answer


[solved] – Question 85718

Develop a nonrecursive algorithm for Algorithm 7-1, “Find Smallest Node
in a BST.”

Expert Answer


[solved] – Question 85758

SBN-13 is a new standard for indentifying books. It uses 13 digits d1d2d3d4d5d6d7d8d910d11d12d13 . The last digit d13 is a checksum, which is calculated from the other digits using the following formula:

10 – (d1 + 3*d2 + d3 + 3*d4 + d5 + 3*d6 + d7 + 3*d8 + d9 + 3*d10 + d11 + 3*d12) % 10

If the checksum is 10, replace it with 0. Your program should read the input as a string. Display “incorrect input” if the input is incorrect.

Expert Answer


[solved] – Question 858

Describe an algorithm that counts for the number of negatives from a list of numbers.

Expert Answer


[solved] – Question 85822

Write code for below problem using java. The input below is just an example and you should implement independent from the input.
You will have an orthogonal triangle input from a file and you need to find the maximum sum of the numbers according to given rules below;

1. You will start from the top and move downwards to an adjacent number as in below.
2. You are only allowed to walk downwards and diagonally.
3. You can only walk over NON PRIME NUMBERS.
4. You have to reach at the end of the pyramid as much as possible.
5. You have to treat your input as pyramid.

According to above rules the maximum sum of the numbers from top to bottom in below example is 24.

*1
*8 4
2 *6 9
8 5 *9 3

As you can see this has several paths that fits the rule of NOT PRIME NUMBERS; 1>8>6>9, 1>4>6>9, 1>4>9>9
1 + 8 + 6 + 9 = 24. As you see 1, 8, 6, 9 are all NOT PRIME NUMBERS and walking over these yields the maximum sum.

Expert Answer


[solved] – Question 85859

Read the results of the election into the array from a text file where each line has the city name, district name and the number of votes the three parties received, below:
city1 district1 232000 145000 13450
cityt2 district2 123500 217800 150000
city1 district3 10500 23000 5500
city3 district4 120450 113000 203000
After the array has been read, do the following according to the user’s input:
List: Input the city name, and list all the information about the districts of the city.
District: Input a district’s name and output which party has won the election in that district
City: Input a city’s name and output which party won the election in that city
Quit: End the program
Run
List | District | City | Quit
Enter your choice of action: List
Enter city name: city1
City: city1
District: district1 Party1: 2320 Party2: 1450 Party3: 13450
District: district3 Party1: 105 Party2: 230 Party3: 5500
List | District | City | Quit
Enter your choice of action: Quit

Expert Answer


[solved] – Question 8587

hi my order no is 30874 and i m wondering that i want my project done on 04/20 8:00pm est instead of 04/19 how much price would that be ? can u get back to me asap so i can make my payment today thank you.

Expert Answer