# c programming , computer science

posted by hisham

1-Write a program that determines the day number (1 to 366) in a year for a date that
provided as input data. As an example, January 1, 1994, is day 1. December 31, 1994, is
day 365. December 31, 1996, is day 366, since 1996 is a leap year. A year is a leap year
if it is divisible by four, except that any year divisible by 100 is a leap year only if it is
divisible by 400. Your program should accept the month, day, and year as integers.
2-The table shows the normal boiling points of several substances. Write a program that
prompts the user for the observed boiling point of a substance in ºC and identifies the
substance if the observed boiling point is within 5% of the expected boiling point. If the
data input is more than 5% higher or lower than any of the boiling points in the table, the
program should output message “Substance unknown”.
Substance Normal boiling point (ºC)
Water 100
Mercury 357
Copper 1187
Silver 2193
Gold 2660

## Similar Questions

1. ### Computer Programming

I must write a program using Java that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should …
2. ### math

i need help with this. In 1994, the number of cassette singles shipped was 81.1 million. In 1997, that number dropped to 42.2 million. Write an equation that gives the number of cassettes shipped, y, in terms of the year, t. Let t=4 …
3. ### Math(Please check)

The value of an automobile was \$15,780 in 1994 and depreciated to \$5400 in 1999. Let y be the value of the automobile in the year x, where x = 0 represents 1994. Write a linear equation in slope-intercept form that models the value …
4. ### math

In 1994 the life expectancy of males in a certain country was 72.7 years. In 2oo1, it was 74.8 years. Let E represent the expectancy in year T and let T represent the number of years since 1994. The linear function E (t) that fits …
5. ### computer science

Your goal is to solve the following programming lab activity. Write a program that prompts & accepts a number between 1 and 12. After getting the input, display the number with the appropriate month. (example: This is the 1st month…January, …
6. ### programming

How do you write a program that prints out your course schedule for a week?
7. ### c++ programming

Write a program that determines the day number (1 to 366) in a year for a date that is provided as input data. As an example, January 1, 2011 is day 1. December 31, 2010 is a day 365. December 31, 2012 is day 366, since 2012 is a leap …
8. ### Logic

Draw a flowchart for a program that reads a date in an 8-digit sequence (month, day, year) and determines if the date is a valid date. ignore leap year. Assume Feb has 28 days, and establish a table of days in a month so that you can …
9. ### math30

The number of cellular phone customers of a particular telephone company increased by an average of 40%/a from 1994 to 1998. If there were 963 300 customers on January 2, 1998, then the number of customers on January 2, 1994, to the …
10. ### Java programming

I have hard time doing this any help? Rewrite the definition of the method setdate and the constructor with parameters so that the values of month, day, and year are checked before storing the date into the data members. Add a method

More Similar Questions