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
Effective communication and critical thinking are examples of
lawyer [7]
The best and most correct answer among the choices provided by the question is the second choice. <span>Effective communication and critical thinking are examples of values. </span>I hope my answer has come to your help. God bless and have a nice day ahead!
3 0
3 years ago
You are preparing to give a presentation at a client’s location using your mobile device and a large screen TV. You have success
Ray Of Light [21]

Answer:

The most probable reason for this is A.

Explanation:

B should be wrong because the TV being connected to a different network segment still means that it is on the Wi-Fi network, it is just using a different switch or a repeater.

C should be wrong because the brightness of the TV does not have anything to do with being able to connect to the phone.

D should be wrong because in the question itself it says that "you tap the mirroring option on your device" which clearly means that the mobile device supports display mirroring.

The answer should be A, if the device and the TV are not on the same Wi-Fi network, than they simply can not connect and the mirroring can not be done.

I hope this answer helps.

7 0
3 years ago
Which of the following collects and provides reports on failed login attempts, probes, scans, denial-of-service attacks, and det
Marrrta [24]

Answer: Option B. System logs

Explanation:

A system log contains records of events that are logged by the operating system components. These events are often predetermined by the operating system itself and they indicates how the system processes and drivers were loaded. System log files may contain information about device changes, device drivers, system changes, events, operations and more.

6 0
3 years ago
Read 2 more answers
I need help can yall help me
AnnZ [28]
8.75
I think this is the answer. The way you solve this is you divide 175 by 20 and then you have the answer.

7 0
3 years ago
Read 2 more answers
Which of the following is considered proper ergonomics?
dexar [7]

Answer:

The First One

Explanation:

because ergonomics is trying to make the person who is using the device be in a more natural position. Raising the keyboard will make the typer feel more comfortable.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of
    7·1 answer
  • Which represents the hierarchical structure of a Google Analytics account from top to bottom?
    5·1 answer
  • How to charge your phone quickly
    9·2 answers
  • A building is equipped with light sensors that turn off the fluorescent lights when natural light is above a certain brightness.
    5·1 answer
  • What is the role of the federal government in regulating the media and the internet?
    6·2 answers
  • What is an instruction set architecture​
    7·2 answers
  • highlight the possible risks and problems that should be address during the implementation of information system process
    5·1 answer
  • Which statement refers to a computer software
    9·1 answer
  • Why does python code generate fewer types of syntax errors than code in other programming languages?
    9·1 answer
  • a data analyst is working with a spreadsheet that has very long text strings. rather than counting the characters themselves to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!