write a program named CheckMonth that prompts a user to enter a birth month
Added by William W.
Step 1
The program will be named `CheckMonth` and will prompt the user to enter their birth month. Show more…
Show all steps
Your feedback will help us improve your experience
Shelayah Robinson and 71 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
Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2012, the program should display that February 2012 has 29 days. If the user entered month 3 and year 2015, the program should display that March 2015 has 31 days.
Shelayah R.
Write two scanf statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a slash, and the year. End with a newline. The program will be tested with inputs 1 2000 and then with inputs 5 1950. Ex: If the input is 1 2000, the output is: 1/2000 Note: The input values come from user input, so be sure to use scanf statements, as in scanf("%d", &birthMonth), to get those input values (and don't assign values directly, as in birthMonth = 1).
create a python program that accepts a user’s birth month and year and passes them to a method that calculates the user’s age in the current month and returns the value to the main program to be displayed.
Willis J.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD