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
maxonik [38]
3 years ago
15

3.19 LAB: Seasons In C++ Write a program that takes a date as input and outputs the date's season. The input is a string to repr

esent the month and 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: Blue 65 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:
vlabodo [156]3 years ago
5 0

Answer:

#include <iostream>

#include <string>

using namespace std;

int main() {

  string mth;

int dy;

cin >> mth >> dy;

if ((mth == "January" && dy >= 1 && dy <= 31) || (mth == "February" && dy >= 1 && dy <= 29) || (mth == "March" && dy >= 1 && dy <= 19) || (mth == "December" && dy >= 21 && dy <= 30))

cout << "Winter" << endl;

else if ((mth == "April" && dy >= 1 && dy <= 30) || (mth == "May" && dy >= 1 && dy <= 30) || (mth == "March" && dy >= 20 && dy <= 31) || (mth == "June" && dy >= 1 && dy <= 20))

cout << "Spring" << endl;

else if ((mth == "July" && dy >= 1 && dy <= 31) || (mth == "August" && dy >= 1 && dy <= 31) || (mth == "June" && dy >= 21 && dy <= 30) || (mth == "September" && dy >= 1 && dy <= 21))

cout << "Summer" << endl;

else if ((mth == "October" && dy >= 1 && dy <= 31) || (mth == "November" && dy >= 1 && dy <= 30) || (mth == "September" && dy >= 22 && dy <= 30) || (mth == "December" && dy >= 0 && dy <= 20))

cout << "Autumn" << endl;

else

cout << "Invalid" << endl;

  return 0;

}

Explanation:

You might be interested in
A content-managed site can be customized _____.
natita [175]

Good question. The best answer is that it all depends on your project's specifications. Here are a few scenarios where a custom CMS would make sense:

You have security concerns or corporate security requirements that would make off-the-shelf platforms unacceptable. An example of this could be stringent security requirements that limit the amount of software licenses allowed, or that require tightening so severe that it would inhibit the ability of the platform to operate correctly. Also, remember that off-the-shelf platforms are more susceptible to random attacks by bots and other automated attackers.

You require advanced features. If you plan on having a website requiring advanced customization, evaluate if you are pushing the limits of off-the-shelf CMS platforms. An example would be software that is core to your business that must be custom built on top of the CMS platform. Future risks could be the inability to run a proper software update, or even worse, a software update breaking your custom code. It happens all the time!

3 0
3 years ago
What mode is generally used when delivering a presentation to an audience?
dybincka [34]

Answer:

delivery mode

Explanation:

there it is

7 0
3 years ago
Read 2 more answers
Suppose that a machine with a 5-stage pipeline uses branch prediction. 15% of the instructions for a given test program are bran
zhenek [66]

Answer:

solution attached below

Explanation:

3 0
3 years ago
Question 1<br> a node is.<br> •a sever<br> A Cell Phone<br> A Laptop<br> a device on a network
RSB [31]

Answer:

From Networkopoint of view, a node is a redistribution point or communication point or a connection point.

It can also mean devices or data points on a large network Such as laptop, phones, printers, etc

Explanation:

3 0
3 years ago
Historia da inteligencia artificial
choli [55]

Answer:

hshdhwvevwuwijwvww

Explanation:

wwgwvisgwgqiwieoiw

5 0
2 years ago
Read 2 more answers
Other questions:
  • Some financial institutions can be really bad about putting unexpected charges
    12·1 answer
  • For a color display using 8 bits for each of the primary colors (red, green, blue) per pixel, what should be the minimum size in
    6·1 answer
  • A(n) ____________ is a program that translates a high-level language program into a separate machine language program.
    7·1 answer
  • Containers for contaminated sharps must have several characteristics. What’s missing from the list? PuContainers for contaminate
    5·2 answers
  • A packet analyzer is a program that can enable a hacker to do all of the following EXCEPT ________. Select one: A. assume your i
    6·1 answer
  • An application programming interface (API) is ________. Select one: A. the code to interface between an application and RAM B. t
    15·1 answer
  • The "fathers of the Internet" are Vinton Cerf and ________. Select one: A. Tim Berners-Lee B. Bill Gates C. Robert Kahn D. Rober
    8·1 answer
  • True or false.local and cloud backup differs in where the backup is saved
    15·2 answers
  • Rick is linking different pages in his website. Match the value of the attribute to its meaning to enable Rick to choose the mos
    13·1 answer
  • What are some applications of computer in public administration?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!