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
What effect does slow sync flash result in
AlladinOne [14]

bad graphics, slow running ,bad connection

7 0
3 years ago
__________ implements a security policy that specifies who or what may have access to each specific system resource and the type
malfutka [58]

Answer: Access control

Explanation:

Access control implements a security policy that specifies who or what may have access to each specific system resource and the type of access that is permitted in each instance.

A typical example of this is in ERPs where access controls defines what access codes a process owner has and what access a reviewer and an approval has. Where a personnel has access to carry out a transaction, review and approve the transaction, access controls are said to be deficient.

The right answer is Access control

Hope this helps!!

6 0
3 years ago
In peer to peer systems, the guarantees offered by conventional servers may be violated by:(a) physical damage to the host;(b) E
gayaneshka [121]

Answer:

Check the explanation

Explanation:

The two examples for each type of violation:

A) Power failure and Act of sabotage

B) Accidental deletion of file and Permission failure

C) Tampering of data, Denial of service attack

D) Failures of HDD (hard disk) and finding program bugs.

Note:

There is a difference in trusted behavior for pc's and servers are relevant because pea-to-peer system must be designed to cope with the looser interpretation of trust for pi s

4 0
4 years ago
The DDBMS Scenario
OlgaM077 [116]

Answer and Explanation:

At C:

a.) This SQL sequence represents a remote request.

b.) This SQL sequence represents a remote request.

c.)This SQL sequence represents a distributed request. Note that the distributed request is required when a single request must access two DP sites. The PRODUCT table is composed of two fragments, PRO_A and PROD_B, which are located in sites A and B, respectively.

d.)This SQL sequence represents a distributed request.

Note that UPDATE CUSTOMER and the two INSERT statements only require remote request capabilities. However, the entire transaction must access more than one remote DP site, so we also need distributed transaction capability. The last UPDATE PRODUCT statement accesses two remote sites because the PRODUCT table is divided into two fragments located at two remote DP sites. Therefore, the transaction as a whole requires distributed request capability.

e.)This SQL sequence represents a distributed transaction. Note that, in this transaction, each individual request requires only remote request capabilities. However, the transaction as a whole accesses two remote sites. Therefore, distributed request capability is required.

At A:

f.)This SQL sequence represents a distributed request. Note that the request accesses two DP sites, one local and one remote. Therefore distributed capability is needed.

g.)This SQL sequence represents a remote request, because it accesses only one remote DP site.

h.)This SQL sequence represents a distributed request. In this case, the PRODUCT table is partitioned between two DP sites, A and B. Although the request accesses only one remote DP site, it accesses a table that is partitioned into two fragments: PROD-A and PROD-B. A single request can access a partitioned table only if the DBMS supports distributed requests.

At B:

i.)This SQL sequence represents a remote request.

j.)This SQL sequence represents a distributed request.

k.)This SQL sequence represents a distributed request. (See explanation for part h.)

5 0
3 years ago
What languages do most of the students at Miami High School speak?
zepelin [54]
Spanish is the most language spoken in the highschool

5 0
3 years ago
Read 2 more answers
Other questions:
  • You are able to change the formatting of a table after it is inserted into a placeholder. True or false
    9·2 answers
  • Which relationship is possible when two tables share the same primary key?
    9·2 answers
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • A network engineer is configuring a network to be able to relay IPv6 packets. The network only supports IPv4 and does not have d
    11·1 answer
  • CHALLENGE ACTIVITY 2.15.1: Reading and outputting strings. Write a program that reads a person's first and last names, separated
    11·1 answer
  • Touchdowns were worth 7 points. Braydenand Gavin scored 7 touchdowns. Cole andFreddy's team scored 9 touchdowns. Howmany more PO
    5·1 answer
  • Negative glue effects
    8·1 answer
  • Professionalism is defined as what?<br> ASAP PLEASE!
    11·1 answer
  • While traditionally employers used computers to track ordering and inventory, computers are used now to
    11·1 answer
  • Create a Quadrilateral, Oval, Triangle, Polygon class that are all extended from an abstract Shape class (given below). Then ext
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!