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
In a complex system, many subsystems interact with one another. How do these systems interact in terms of inputs and outputs?
Artemon [7]

Answer:

I think in there transmission you know inputs into ports like for their own

Explanation:

likeslike Spanish and is obviously inputs and outputs their portsinto the portsdifferent ports you know

4 0
3 years ago
Which of the following is an example of tangible property?
lyudmila [28]
<span>B an idea for an invention that your dad mentioned briefly but did not write down</span>
8 0
3 years ago
Which of the following is not true about network design?Group of answer choicesIn designing LAN networks, network designers tend
sergey [27]

Answer:

In designing LAN networks, network designers tend to design err on the side of providing for less capacity than what is currently necessary.

Explanation:

In designing LAN networks, network designers tend to design err on the side of providing for less capacity than what is currently necessary is not true about network design.

8 0
3 years ago
What is a device that connects to the system unit and is controlled by the processor in the computer called !
Airida [17]
Most computers have three types of ports: serial, parallel, and USB. A serial port is a type of interface that connects a device to the system unit by transmitting data only one bit at a time. Serial ports usually connect devices that do not require fast data transmission rates, such as a mouse, keyboard, or modem.
4 0
3 years ago
1. The Forever block is present in the<br> ......... block category.
rosijanka [135]

Answer:

loop or a repeating block. I think it’s this because I like robotics and I have to know a lot of different kinds of blocks.

Explanation:

This is why.

8 0
1 year ago
Other questions:
  • In which setting would you be least likely to find a full-time A/V technician?
    5·2 answers
  • 1) which colour filter is used to pumps up black and white effects?
    13·1 answer
  • Mark works as a Network Administrator for NetTech Inc. The company has a Windows Server 2008 domain-based network. The network c
    7·1 answer
  • _____ is the widely used transport layer protocol that most Internet applications use with Internet Protocol (IP).
    9·1 answer
  • Why is compression a "hard problem" for computers? Draw on your own experience compressing text with the text compression widget
    12·1 answer
  • What is your favourite video game??​
    5·2 answers
  • Which expression is equivalent to 3x + 3x + 3x?<br><br> From Performance Matters
    11·2 answers
  • This is a human-made physical system.
    15·1 answer
  • Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value w
    11·1 answer
  • Kinda strange, and im good
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!