parameter "years", return the given value convert into days in c++ Example input: -5 Example output: -1,825
Added by Diego L.
Step 1
In this case, we will assume there are 365 days in a year. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 65 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Days into the year algorithm (C++)" Write a pseudocode for an algorithm to determine the number of days into a year for a SPECIFIC date. For example, if a user inputs Jan 1, then the output should return 1. If the user inputs Feb 28, the output should return 59. Or, if a user inputs Dec 31, then the output must return 365. Remember to include the year in the parameters because you need to add an extra day if it is March or greater and it is a leap year. So write the algorithm and have the user input any date using the following format: YYYY-MM-DD
Akash M.
Write a function called birthday that takes in three parameters (month, day, and year) and returns it in the format month/day/year. For example, birthday(11, 17, 1990) should return "11/17/1990" and birthday(7, 5, 2004) should return "7/5/2004".
Create a program that will accept integer values for the month, day, and year and then output the long version of the specified date. For example, if month = 11, day = 5, and year = 2010, output the string "November 5, 2010". If there is any invalid input, display "Invalid date" and end the program.
Shelayah R.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD