1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
cestrela7 [59]
3 years ago
7

write a program that asks the user for a month number and displays the number of days that month has?

Computers and Technology
2 answers:
adoni [48]3 years ago
7 0

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.

uranmaximum [27]3 years ago
4 0

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.

You might be interested in
(word excel)
Aloiza [94]
D is the answer to that problem
7 0
3 years ago
Select the correct answer.
Vsevolod [243]

Answer:

A.  inspection

Explanation:

To find - Monica, a reviewer, wants to use a formal review for the SQA process. Which review should Monica use for this purpose?

A.  inspection

B . internal audit

C.  test review

D . walkthrough

Proof -

SQA process - Software Quality Assurance process

The correct option is - A.  inspection

Reason -

Formal review in software testing is a review that characterized by documented procedures and requirements. Inspection is the most documented and formal review technique.

The formality of the process is related to factors such as the maturity of the software development process, any legal or regulatory requirements, or the need for an audit trail.

The formal review follows the formal process which consists of six main phases – Planning phase, Kick-off phase, the preparation phase, review meeting phase, rework phase, and follow-up phase.

3 0
3 years ago
Meaningful decisions are important to sustaining immersion, but it’s generally considered poor game design to constantly give th
bezimeni [28]

Answer:

Explanation:

Meaningful decisions are important to sustaining immersion, but it's generally considered poor game design to constantly give the player "critical" decisions. Describe a game you know and how it asks the player to make a variety of decisions from the different levels of Tracy Fullerton's Decision Scale.

7 0
4 years ago
Put the parts of the program in order to have the output shown below.
Ksenya-84 [330]
Diana is attaching a brace to a rectangular gate. She will put the brace on the diagonal of the rectangle as shown.
5 0
3 years ago
When opening the Microsoft® Publisher® application, a user can choose all of the following EXCEPT.
lora16 [44]

Answer:

Explanation:

Publisher can help us with different marketing tasks but never is the same job that a professional working in Photoshop or Corel draw, but if we can make simple marketing tasks is enough.

We can do different tasks in publisher for example:

  • Newsletters
  • Signboards
  • Postcards
  • Invitations cards
  • Greeting cards
  • Business cards
  • Letterhead
  • Envelopes
  • Forms
  • Banners
  • Calendars
  • Brochures
  • Catalogs
  • Prospects
  • Advertisements
  • Diplomas
  • Gift vouchers
  • Tags
  • Greeting cards
  • Menus Programs
  • Airplanes Paper Figures
7 0
3 years ago
Other questions:
  • Mark for review (Will be highlighted on the review page) 3. Which one of the following word processing features saves you the mo
    14·1 answer
  • You are a networking consultant who has been asked to penetration test the network of a small business. you located a target wir
    11·1 answer
  • How to make a cartoon can we use adobe flash
    7·2 answers
  • What is the film format that many filmmakers feel is superior to any other format?
    13·1 answer
  • let's imagine you're searching for hotels in searching chicago, what should you search for in order to get the most relevant res
    11·1 answer
  • IF YOU COULD CREATE A SOCIAL NETWORK:, what would it be like? What would make it so special about the others? (If you want you c
    9·1 answer
  • What is radio frequency identification used for
    6·1 answer
  • How can we style the images and layouts of our pages?
    8·1 answer
  • 1.
    7·1 answer
  • What is digital museum​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!