Write a program to input the month number and display the number of days in the month.
Answers
Answered by
0
Answer:
answer_Write a C program to enter month number between(1-12) and print number of days in month using if else. How to print number of days in a given month using if else in C programming. Logic to find number of days in a month in C program.
Example
Input
Enter month number: 1
Output
It contains 31 days.
Answered by
1
Javascript program :
var m = document.prompt("Enter Month Number") ;
if(m = 1 || m = 3 || m = 5 || m = 7 || m = 8 || m = 10 || m = 12){
document.write("31");
}else if(m = 2){
document.write("28 or 29");
}else{
document.write("30");
}
Similar questions
Math,
1 month ago
Hindi,
1 month ago
Social Sciences,
1 month ago
Computer Science,
3 months ago
Hindi,
9 months ago
Math,
9 months ago