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
Nostrana [21]
3 years ago
8

Write a program that inputs an integer denoting a month (1 for January, 2 for February, ... , 12 for December), and outputs how

many days are in that month. Assume no leap years. For example, if the input is 2, the output is 28. If the input is 11, the output is 30.[ There are a variety of ways to do this...One approach is to use 12 separate if-then statements. Another approach uses just 3 if-then statements and the logical OR operator (which is ||). ]
Computers and Technology
1 answer:
Korolek [52]3 years ago
6 0

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int inp_month;

cout<<"Enter month:";

// read month

cin>>inp_month;

// if month is february

if(inp_month==2)

cout<<"Number of days in month:28"<<endl;

// if month is 4 or 6 or 9 or 11

else if(inp_month==4||inp_month==6||inp_month==9||inp_month==11)

cout<<"Number of days in month:30"<<endl;

else

// for others month

cout<<"Number of days in month:31"<<endl;

return 0;

}

Explanation:

Read month from user and assign it to variable "inp_month".If month is 2 then  there is 28 days in the month.If input month is 4 or 6 or 9 or 11 then there is 30 days in the month.For other month there will be 31 days in month.We assume there is no leap year.

Output:

Enter month:4                                                                                                              

Number of days in month:30

You might be interested in
The numbering system we commonly use is called the decimal numbering system because it uses ________ symbols to represent all po
mojhsa [17]

Answer:

10.

Explanation:

Decimal numbering system is a number system which has ten digits. These ten digits are 0,1,2,3,4,5,6,7,8 and 9. It has signed and unsigned digits. The signed digits represents negative values of digit with the minus "-" sign written before the digit. The unsigned digits have no sign before them.

Binary numbering system has only 1 and 0 digits, while the hexadecimal number system has 16 digits.

6 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
Tasya [4]

Answer:

They should sign an indefinite contract with a computer hardware support company.

Explanation:

It should be an indefinite contract because the company needs a periodic maintenance for its devices.

8 0
3 years ago
A network design engineer has been asked to design the IP addressing scheme for a customer network. The network will use IP addr
Lilit [14]

Answer:

192.168.30.0/24 is the network IP address and 192.168.30.255/24 is the IP broadcast  address.

Explanation:

The first IP (192.168.30.0/24) address of your subnet is the network address,  the last IP (192.168.30.255/24) address of your subnet is your broadcast address and the available usable IP addresses in your subnet are subnet size -2, because network address and broadcast address cannot be allocated to a system.

7 0
3 years ago
What are the three primary components of an inbox?
Ymorist [56]

Answer:

C

Explanation:

edg2021

3 0
3 years ago
How to be professional in graphic design without CAD?
Mama L [17]

Answer:

There are two types of image processing software, raster-based, and vector-based. The CAD and the CAID are just the two vectors based software. However, there is much other software like Adobe Illustrator, Microsoft Publisher, Corel Draw, Photoshop on which you can embark upon, and become an equally good Graphics designer. And hence, you can certainly become a Graphics designer with the CAD experience, however, you should keep in mind that all the great Graphic designers use CAD and CAID. And hence, you should use it sometimes certainly in the future.

Explanation:

Please check the answer section.

4 0
3 years ago
Other questions:
  • Simon wants to use an invoice template created by Office.com. The first step after selecting the File tab is to select
    14·1 answer
  • Microsoft windows server and linux are examples? of:
    12·1 answer
  • Word 2013 opens, by default, on a blank document?
    13·2 answers
  • Please answer questions 34, 36 &amp; 37. <br><br>No explanation required. ​
    8·1 answer
  • What were the technological innovations that allowed for the rapid expansion of the railroads?
    6·1 answer
  • If you want to display information from a database to someone who is not a user of the database, you will have to use:
    7·1 answer
  • One of the greatest benefits of dual enrollment courses is that students can receive:
    15·2 answers
  • How do I convert years to days on Python. For example, if I were to enter 3 years it should output "You are 1095 days old".
    5·1 answer
  • I need to find out how to mark brainliest so just answer this and the first person will be marked brainliest.
    12·1 answer
  • there are n houses in a row numbered from 1 to n. an array infected houses contains the houses the houses which are infected wit
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!