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
Communications technology and the Internet can be used to reduce the time and costs involved in disseminating financial statemen
mash [69]

Answer: D)XBRL(eXtensible Business Reporting Language)

Explanation: XBRL(eXtensible Business Reporting Language) is the type of XML(eXtensible Markup Language) that is used for the improvement in the transparency between the recipient and the business organization regarding the accessibility of the financial information.

The financial data is formatted uniformally so that the user can get the knowledge about the finance through the online sources like internet.

Other options are incorrect because HTML and XML are the markup languages but not for the financial area and PDF file is the file that stores data.Thus correct option is option(D).

4 0
4 years ago
QuickBooks Online (QBCU) Session 4: Post Assessme
Arada [10]

<em>Hence, I don't really know since I'm NOT 21 Years Old. If you're trying to record a credit/refund for a returned item, you'll have to enter a deposit, then link it to the vendor credit.  </em>

<em> </em>

<em>  </em>

<em> </em>

<em>First, you'll have to enter the refund as a deposit. Here's how: </em>

<em> </em>

<em>Click the Plus sign (+) icon. </em>

<em>Choose Bank Deposit. </em>

<em>Under Add funds to this deposit, choose the vendor name in the Received from field. </em>

<em>Choose Accounts Payable in the Accounts field, then enter the credit/refund amount in the Amount field. </em>

<em>Click Save and close. </em>

<em>Next, link the deposit to the vendor credit. Here's how: </em>

<em> </em>

<em>Click the Plus sign (+) icon. </em>

<em>Choose either Expense or Check. </em>

<em>Choose the vendor name. </em>

<em>On the right pane, under Add to Expense/Check, add the deposit by clicking Add. </em>

<em>Click Save and close. </em>

<em>Though, if you want to apply a vendor credit to a bill, check this article for the steps (Scenario 2): Manage vendor credits. </em>

<em> </em>

<em>  </em>

<em> </em>

<em></em>

3 0
4 years ago
Can someone please tell me what I’m doing wrong ? Please and it’s due on Thursday!!
liberstina [14]

Answer:

Sure. In Unit test 5, it's looking for 1 instead of 0. You are returning 0 instead of 1.

0 requires 1 digit to express it and should therefore return 1.

In line 6, change the 0 to a 1.

8 0
2 years ago
C. An error that due to wrong input.​
ladessa [460]

c. An error that due to wrong input.

=> Bug

<em>Hope </em><em>it</em><em> is</em><em> helpful</em><em> to</em><em> you</em>

6 0
3 years ago
A machine’s ability to mimic human thinking to behave in a way that appears to be learning and solving problems is known as:
kkurt [141]

D. game mechanics D. game mechanics

7 0
3 years ago
Other questions:
  • Regarding an intrusion detection system (IDS), stateful matching looks for specific sequences appearing across several packets i
    9·1 answer
  • You are the system administrator for a medium-sized Active Directory domain. Currently, the environment supports many different
    7·1 answer
  • You have just created a one-way incoming trust in your domain for an external domain used by a partner company to allow your dom
    11·1 answer
  • Mary is an aspiring web designer. Which degree she should opt for to strengthen her portfolio? A. bachelor’s degree in computer
    11·1 answer
  • How does video conferencing change the way we work today?
    6·1 answer
  • The options are file protection , fault-tolerance , fault line , file tolerance , and the question is which term describes the d
    6·1 answer
  • You work for a retail clothing chain whose primary outlets are in shopping malls and are conducting an analysis of your customer
    13·1 answer
  • Which language will report a compilation error for the following snippet of code? int i = 3; double n, j = 3.0; n = i + j; Group
    11·1 answer
  • What is the way to discover requirments for software projects ?
    14·1 answer
  • In this class, it is very common for your computer screen to look like this. What is this?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!