c programming , computer science

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

asked by hisham

Respond to this Question

First Name

Your Answer

Similar Questions

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. computer programming

    Mr. Dacara owns 20 apartment buildings. Each building contains 15 units that he rents 5,000 PhP per month each. He wants a program that will print 12 payment receipt coupons for each of the 15 apartments in each of the 20
  9. 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
  10. C++

    // Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert

More Similar Questions