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
11111nata11111 [884]
4 years ago
14

Seasons Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month a

nd an int to represent the day. Ex: If the input is April 11, the output is: spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is invalid, the output is: invalid The dates for each season are: spring: March 20 - June 20 summer: June 21 - September 21 autumn: September 22 - December 20 winter: December 21 - March 19
Computers and Technology
1 answer:
Ierofanga [76]4 years ago
3 0

Answer:

#include <iostream>

#include <string>

using namespace std;

int main() {

   string inputMonth;

   int inputDay;

   cin >> inputMonth >> inputDay;

   if (inputMonth == "January" && inputDay >= 1 && inputDay <= 31)

       cout << "Winter" << endl;

   else if (inputMonth == "February" && inputDay >= 1 && inputDay <= 29)

       cout << "Winter" << endl;

   else if (inputMonth == "April" && inputDay >= 1 && inputDay <= 30)

       cout << "Spring" << endl;

   else if (inputMonth == "May" && inputDay >= 1 && inputDay <= 30)

       cout << "Spring" << endl;

   else if (inputMonth == "July" && inputDay >= 1 && inputDay <= 31)

       cout << "Summer" << endl;

   else if (inputMonth == "August" && inputDay >= 1 && inputDay <= 31)

       cout << "Summer" << endl;

   else if (inputMonth == "October" && inputDay >= 1 && inputDay <= 31)

       cout << "Autumn" << endl;

   else if (inputMonth == "November" && inputDay >= 1 && inputDay <= 30)

       cout << "Autumn" << endl;

   else if (inputMonth == "March" && inputDay >= 20 && inputDay <= 31)

       cout << "Spring" << endl;

   else if (inputMonth == "June" && inputDay >= 1 && inputDay <= 20)

       cout << "Spring" << endl;

   else if (inputMonth == "June" && inputDay >= 21 && inputDay <= 30)

       cout << "Summer" << endl;

   else if (inputMonth == "September" && inputDay >= 1 && inputDay <= 21)

       cout << "Summer" << endl;

   else if (inputMonth == "September" && inputDay >= 22 && inputDay <= 30)

       cout << "Autumn" << endl;

   else if (inputMonth == "December" && inputDay >= 0 && inputDay <= 20)

       cout << "Autumn" << endl;

   else if (inputMonth == "December" && inputDay >= 21 && inputDay <= 30)

       cout << "Winter" << endl;

   else if (inputMonth == "March" && inputDay >= 1 && inputDay <= 19)

       cout << "Winter" << endl;

   else

       cout << "Invalid" << endl;

   return 0;

}

You might be interested in
You are tasked with designing an airplane that could carry a very large load of cargo. What type of airfoil would you use for th
Allisa [31]

Answer:

This maximizes the ability of a plane with a heavy load to take off within the given output of engine constraints. Comparing the data received from the software, and other calculations it is determined that the S1223 is the best airfoil with a high coefficient of lift and a small coefficient of drag.

Explanation:

mark me brainliest

8 0
3 years ago
I need help ASAP Asap asap!!!
timama [110]

Tbh this is a very poor question, mainly because it just assumes you play games at all.


Not only that, but it's really an opinion based question, unless they defined "poor game design puzzles" for you to work with.


Anywho, Just talk about how Breath of The Wild had poor temple design(Too easy) and talk about how you would make the temples larger and not a tiny "divine beast"(actually large in size, but small for a temple). Hope this helps I guess. Lol

8 0
3 years ago
How has the dependence on technology made humanity less intelligent?​
shepuryov [24]

Answer:

People now rely on the internet for answers.

Nobody truly learns stuff and keeps it with them anymore. They know they can just search it again, and get the answer.

3 0
3 years ago
Write three function prototypes:
Natalka [10]

Answer:

Declaration for function 1:

void printHeading(String heading);

Declaration for function 2:

int yearPage(int currentYear, int birthYear);

Declaration for function 3:

void printable(String [] names, int [] birthDays, int size);

Explanation:

Prototypes of any function includes its return type followed by its name followed by list of arguments used by it enclosed within parenthesis.

Syntax for method declaration:

return_type  function_name (list_of_arguments);

8 0
3 years ago
In older systems, often the user interface mainly consisted of ____-control screens that allowed a user to send commands to the
Scilla [17]

Answer:

Process

Explanation:

In older systems, the user interface mainly consisted of process-control screens that allowed a user to send commands to the system. These systems were used in a great variety of industries, and it gave the user control over process measurements or process variables. It also allowed the user to view the current state of the process, modify the operation of the process, and perform other related actions.

6 0
4 years ago
Other questions:
  • Define the missing method. licenseNum is created as: (100000 * customID) + licenseYear. Sample output: Dog license: 77702014
    14·1 answer
  • A voice engineer is setting up a Cisco 2951 Integrated Services Router with Cisco Unified Communications Manager Express. To ena
    6·1 answer
  • Which of these items will least likely increase pressure in the evaporative emission control system?
    9·1 answer
  • What is the difference between a key and a superkey?
    10·1 answer
  • Which of the following sentences is correct?a. Arithmetic log unit is used to perform both integer and floating point computatio
    8·1 answer
  • Francis has created a new program. However, Francis used some objects from another program to run methods in the current program
    14·2 answers
  • Application servers are usually grouped into two types: page-based and _____ systems.
    6·1 answer
  • Javier is asked to explain to IT management as to why he is suggesting replacing the existing company firewall. Javier states th
    11·1 answer
  • Suppose that a NAT is between the Internet and a company's network. Now suppose that the NAT crashes, but quickly restarts, in a
    7·1 answer
  • Question #2
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!