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
Maksim231197 [3]
3 years ago
10

Design a program that asks the user to enter a month (in numeric form), a day, and a two-digit year. The program should then det

ermine whether the month times the day equals the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic.
Computers and Technology
1 answer:
Irina-Kira [14]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int mt, day, yr, magic;

   cout << "Enter a month(numeric form)"<< endl;

   cin >> mt;

   cout << "please enter a day"<<endl;

   cin >> day;

   cout << "please enter a year"<< endl;

   cin >> yr;

   // Input Validation

   if (mt<1 || mt>12){

       cout<<"Invalid Month";

   }

   else if (day<1||day>31){

       cout<<"Invalid Day";

   }

   else if (yr>99||yr<0){

       cout<<"Invalid Year";

   }

   else{

   // Calculates magic

   magic = (mt * day);

   if (magic == yr)

   {

   cout << "it is a magic year"<<endl;;

   }

   else

   cout << "It is not a magic year" << endl;

   }

   return 0;

}

Explanation:

Using C++ we request the user to enter values for Month, day and year (two digits). We carry out input validation to ensure the user enters a valid month, day and year. Using if/elseif/if statements we ensure the conditions given in the question.

You might be interested in
Public places where you can wirelessly connect to the internet are known as wifi ________.
AleksAgata [21]

<span>Answer - Hotspots</span>

<span>
</span>

<span>Public places where you can wirelessly connect to the internet are known as Wi-Fi hotspots. Common Wi-Fi hotspot locations (where wireless internet connection is offered) include such places as cafes, hotels, airports, and libraries. These businesses usually create hotspots for the use of their customers.</span>

8 0
3 years ago
true of false one reason to move to a paperless society is that printers are becoming prohibitively expensive
Yakvenalex [24]
True because printers, which require paper, are becoming more expensive. A paperless society has the advantage of being cheaper in this aspect.
5 0
3 years ago
PLS HELP SOON AS POSSIBLE WILL GIVE BRAINLIEST!!!
Evgesh-ka [11]

The best reason that the title of an article published on a website might not help to determine if the information is reliable is that titles attract readers; they do not guarantee accuracy

  • The title of an article tells the reader what the work or article is all about. It summarizes the whole work into a single text. Website in bid to attract more people to their page most times uses attractive titles or commonly search words but this does not show that the work is accurate.

  • People often make or select a title that grabs attention and one that makes people want to read further

Conclusively we can say that The title of an article published on website is meant to attract readers as they do not guarantee accuracy

Learn more from

brainly.com/question/11427677

5 0
2 years ago
Describe what a layer 3 router is and what are its advantages and drawbacks compared to other network devices.
Oduvanchick [21]

Answer:

Did you mean layer 3 switch? Because a router always operates at layer 3

Explanation:

If the answer is yes, then a layer 3 is a switch that combines the functions of a switch and a router. So it is capable of operate layer 2 and layer 3. Some of its benefits are: Support routing between VLAN, decrease network latency because the packets don’t have to make extra hops to go through a router and reduce security management. But they are really expensive and lack of WAN functionality so they are used mostly for large intranet environments.

3 0
3 years ago
After installing an update on her MacBook, a user contacts the technician to complain that the WiFi is not working. The WiFi ico
GarryVolchara [31]

Answer:

The correct answer to the following question will be "PRAM needs to be reset".

Explanation:

<u>PRAM:</u>

  • It is commonly known as "Parameter Random Access Memory". It is a memory that is used to store the settings of the system of a Mac OS. These settings comprise of monitor settings, speaking settings, WI-FI settings, etc.
  • So, according to the given case when the WI-FI icon shows that the system is connected to the internet but he is not able to browse the internet. In this case, he needs to reset the PRAM to browse the internet.

So that the above is the right answer.

4 0
3 years ago
Other questions:
  • A laptop gets replaced if there's a hardware issue. Which stage of the hardware lifecycle does this scenario belong to?
    5·1 answer
  • The trademarked name of the accepted standard for configuring wireless networks is _______________
    12·1 answer
  • Clearing the computer's cache helps store recently-used information.<br><br> True<br> False
    10·2 answers
  • Consider the following code:
    13·1 answer
  • Design a class named QuadraticEquation for a quadratic equation ax^2+bx+x=0. The class contains: **private data fields a, b, and
    11·1 answer
  • Kelvin owns a small trading firm. Recently, he suspected that some of his employees were using fraudulent activities for their p
    5·2 answers
  • If the algorithm does not have instructions for unanticipated results, the computer program will
    15·1 answer
  • How do you enter the decimal 73 into the computer?
    11·1 answer
  • I came here for a answer so why did i get a pep talk
    7·2 answers
  • The different languages that follow specific RULES. These languages use commands
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!