Months
Lesson 5 of 32 in Coddy's Coding Problems course.
Create a program which will calculate how many days are there in a month. The months will be given with a number.
Challenge
EasyWrite a program that gets a natural number N from input representing the number of the month and outputs the number of days in that month.
We will assume that it's not a leap year, so February has 28 days
Input
1
Output
31
Input
9
Output
30
Try it yourself
#include <stdio.h>
int main() {
// Write code here
return 0;
}
All lessons in Coding Problems
1Course Introduction
Introduction