Display Number of Days in a Month Using Switch Statement in C

This program displays the number of days in a given month (1-12) using a switch statement, taking leap years into account for February. C Program #include <stdio.h> int main() { int month, year, days; printf(“Enter month (1-12): “); scanf(“%d”, &month); printf(“Enter year: “); scanf(“%d”, &year); switch (month) { case 1: case 3: case 5: case … Read more