Question: C++ programming 7. Write a program that determines the day number (1 to 366) in a year for a date that is provided as input

C++ programming

C++ programming 7. Write a program that determines the day number (1

7. 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, 1994, is day 1. December 31, 1993, 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 on accept the month, day, and year as integers. Include a function leap that retuns 1 if called with a leap year, o otherwise. ly if it is divisible by 400. Your program should 8. Write a program that interacts with the user like this (1) Carbon monoxide (2) Hydrocarbons (3) Nitrogen oxides 4) Nonmethane hydrocarbons Enter pollutant number>> Enter number of grams emitted per mile> Enter odometer reading>> 0212 Emissions exceed permitted level of 0.31 grams/mile. 0.35 Use the table of emissions limits below to determine the appropriate r message.1 First 50,000 Miles Second 50,000 Miles .4 grams/mile 0.31 grams/mile 0.4 grams/mile 0.25 grams/mile carbon monoxide 4.2 grams/mile 0.39 grams/mile 0.5 grams/mile 0.31 grams/mile nitrogen oxides nonmethane hydrocarbons

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!