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
Aloiza [94]
3 years ago
8

Write a piece of codes that asks the user to enter a month (an integer), a day (another integer), and a two-digit year. The prog

ram should then determine whether the month times the day is equal to 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.
#include
using namespace std;
int main()
{
int day;
int month;
int year;
cout<<"enter year"< cin>>year;
cout<<"enter day"< cin>>day;
cout<<"enter month"< cin>>month;
//programology..
if(month*day==year)
{
cout<<"its magic programology year"< }
else
{
cout<<"its not magic year"< }
}
Computers and Technology
1 answer:
Sliva [168]3 years ago
6 0

Answer:

Follows are the code to this question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int day,month,year;//defining integer variable

cout<<"please enter last two digit of the year: "; //print message

cin>>year;//input year value

cout<<"enter day: "; //print message

cin>>day;//input day value

cout<<"enter month: ";//print message

cin>>month;//print month message

if(month*day==year)//check magic date condition  

{

cout<<"its magic programology year";//print message

}

else

{

cout<<"its not magic year";//print message

}

return 0;

}

Output:

please enter last two digit of the year: 98

enter day: 14

enter month: 7

its magic programology year

Explanation:

In the given code, three integer variable "day, month, and year" is declared, that uses the input method "cin" to input the value from the user-end.

In the next step, an if block statement is used that check month and day value multiple is equal to year value, if the condition is true it will print "magic programology year" otherwise it will print "not the magic year".

You might be interested in
What is your understanding about the subject “digital image processing”?
N76 [4]

Answer:

Here's your answer mate.....☺️☺️

Explanation:

In computer science, digital image processing is the use of a digital computer to process digital images through an algorithm. ... It allows a much wider range of algorithms to be applied to the input data and can avoid problems such as the build-up of noise and distortion during processing.

<em><u>Hope it helps </u></em>☺️

5 0
3 years ago
With more and more users using mobile to look at websites, it is key that you optimise your site so users can find it when searc
inessss [21]

Answer:

Site speed and usability.

Explanation:

Web pages are developed using web development tools like HTML, CSS, JavaScript etc. A collection of these web pages are called a website. The web is a hosted for internet use in a web server.

All requests for a website in a web server is done in a web browser in a client device. For a website to be easy searched for , the search engine optimisation technique is used.

A hosted website on a server must have a unique and usable domain name and the page loading on a browser should be made faster by optimising the size of the scripting language.

3 0
3 years ago
What is Service Operations in ITIL​
Nostrana [21]

Explanation:

the objective of ITIL service operations is to make sure that IT services are delivered effectively and efficiently. the service operation life cycle stage includes the fulfilling of user requests, resolving service failure fixing problems and also carrying out routine operational tasks

7 0
3 years ago
To quickly save a file, use the keyboard shortcut ________. ctrtl shift s ctrl s ctrl a ctrl shift-a
Advocard [28]
You have to use control + s only. but if you want to save it in different format, use control + shift + S
3 0
3 years ago
What kind of software would you use to view and troubleshoot protocol-specific problems such as TCP retries caused by missed ack
sveticcg [70]

Answer:

The kind of software to use is a protocol analyser.

Explanation:

The Protocol analyser, which could either be a hardware or a software is a tool that is used for capturing and analysing signals and also interpreting network traffic over a communication channel or between two or more connected computer systems

Protocol analysers can be used to find out location of problems on Local Area Network by examining flow of traffic.

7 0
3 years ago
Other questions:
  • 2. Consider a 2 GHz processor where two important programs, A and B, take one second each to execute. Each program has a CPI of
    12·1 answer
  • One of the earlier applications of crypto-graphic hash functions was the storage of passwords to authenticate usersin computer s
    13·1 answer
  • When using a template to compose a memorandum which key on the keyboard moves the cursor to the next field
    15·1 answer
  • For computers, which color is NOT a primary color
    13·1 answer
  • Write a program that prints all the numbers from 0 to 6 except 3 and 6. Expected output: 0 1 2 4 5
    13·1 answer
  • What is the least number of bits you would need to borrow from the network portion of a Class B subnet mask to get at least 130
    10·1 answer
  • Creating a chart using a spreadsheet Chart Wizard involves four steps. Which is the last step?
    6·1 answer
  •  Which device containing sensors send signals to the computer whenever light changes are detected? 
    11·1 answer
  • Add comma(s) where needed, if needed.
    8·1 answer
  • What is the basic body structure of html.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!