Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Join our platform to connect with experts ready to provide precise answers to your questions in different areas. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.
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.
Thanks for stopping by. We are committed to providing the best answers for all your questions. See you again soon. We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Discover more at Westonci.ca. Return for the latest expert answers and updates on various topics.