Welcome to Westonci.ca, where you can find answers to all your questions from a community of experienced professionals. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.
Sagot :
Answer:
Using c++
Explanation:
#include<iostream>
using namespace std;
int main() {
int num;
cout<<"ENTER THE NUMBER OF THE MONTH"<<endl;
cin>>num;
if(num<=1) {
cout<<"The first month is January and it has 31 days";
}
else if(num<=2) {
cout<<"The second month is February and it has 28 days";
}
else if(num<=3) {
cout<<"The third month is March and it has 31 days";
}
return 0;
}
For the remaining months all you need to do is follow these steps.
Answer:
I have used Python language for your question. Code is below in Bold Letters.
Explanation:
Code starts from next line.
print("1 for Jan\n2 for Feb\n3 for Mar\n4 for Apr\n5 for May\n6 for Jun\n7 for Jul\n8 for Aug\n9 for Sep\n10 for Oct\n11 for Nov\n12 for Dec")
a = int(input("Enter the number of a month: \n"))
b = 28
c = 29
d = 30
e = 31
if a == 1:
print("The month January has", e, "days")
elif a == 2:
print("The month Febuary has",b, "or", c, "days")
elif a == 3:
print("The month March has", e, "days")
elif a == 4:
print("The month April has", d, "days")
elif a == 5:
print("The month May has", e, "days")
elif a == 6:
print("The month June has", d, "days")
elif a == 7:
print("The month July has", e, "days")
elif a == 8:
print("The month August has", e, "days")
elif a == 9:
print("The month September has", d, "days")
elif a == 10:
print("The month October has", e, "days")
elif a == 11:
print("The month November has", d, "days")
elif a == 12:
print("The month December has", e, "days")
else:
print("Enter a valid number")
Code ends here.
Those who found this answer helpful please give me a Thanks and support me. So, I can explain my answers more properly and give you the codes as short as possible. I am not saying to mark me brainliest but to give me Thanks.
We appreciate your time. Please come back anytime for the latest information and answers to your questions. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Westonci.ca is committed to providing accurate answers. Come back soon for more trustworthy information.