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
Ilia_Sergeevich [38]
4 years ago
12

Write a program that reads in two integers typed on the keyboard and outputs their sum, difference, and product.

Computers and Technology
1 answer:
dsp734 years ago
6 0
# Written in python

a = int(input("Enter an integer: "))
b = int(input("Enter an integer: "))

sum = a + b

# subtract the smaller number from the bigger
if a < b:
    dif = a - b
else:
    dif = b - a

prod = a * b

print("The sum is", sum)
print("The dif is", dif)
print("The product is", prod)
You might be interested in
Why are there 2 types of ip addresses like 172.16.254.1 or 2001:db8:0:1234:0:567:8:1?
solong [7]
The first example is an IPv4 address. Because IPv4 is only 32 bits long there are only about 4 billion addresses available. To expand the address space IPv6 came into existence and your second example is an IPv6 address.
7 0
3 years ago
11) A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one chil
ollegr [7]

Answer:

The correct answer is Option A (A class can only have one parent class (superclass))

Explanation:

The inheritance model is a computer program used in Javascript. This model aimed to make code that has been programmed already still relevant to be used again at any time minimizing errors associated with typing a new code. Inheritance  makes the attributes of a particular class valid while still possible to use the attributes of another class.

A child class (subclass) inherits from the parent class (superclass). So, it is a single inheritance once the child class (subclass) inherits from a single parent class (superclass) creating a subclass. A parent class (superclass) is the class that gives its attributes for inheritance.

8 0
3 years ago
11.19 (Constructor Failure) Write a program that shows a constructor passing information about constructor failure to an excepti
iren2701 [21]

Answer:

You absolutely should throw an exception from a constructor if you're unable to create a valid object. This allows you to provide proper invariants in your class. ... Throw an exception if you're unable to initialize the object in the constructor, one example are illegal arguments.

Explanation:

6 0
3 years ago
I can login to it says to me u cant login at that time
sesenic [268]

Answer:

hhlbkhhlbhk

Explanation:

5 0
3 years ago
Read 2 more answers
Which destination ip address is used when an ipv6 host sends a dhcpv6 solicit message to locate a dhcpv6 server?
Dvinal [7]
Ff02::1:2


---------------------------
7 0
4 years ago
Other questions:
  • Which statement about information published on the internet is true?
    9·2 answers
  • The ________ occurs when the user presses the enter key without typing a value for an input operation.
    5·1 answer
  • .exe, .msi, .msp, .inf - together, what do these filetypes indicate
    12·2 answers
  • She thinks it is a good idea to list the gasses bass ed on the the gas found in the atmosphere ...
    12·1 answer
  • This is not homework but how do you fix this I’ve tried everything
    9·1 answer
  • What is the maximum rate at which computers A and B can communicate, via router X? (your answer should be in Mbps)
    12·1 answer
  • Assume that the vector arr has been declared. In addition, assume that VECTOR_SIZE has been defined to be an integer that equals
    10·1 answer
  • Which of the following peripheral devices can be used for both input and output? mouse touch screen on a tablet computer printer
    5·1 answer
  • Program code that can be evaluated to a value is called a(n):__________
    12·1 answer
  • One day you tap your smartphone screen to turn it on, and nothing happens. It appears to be turned off and will not turn on. Wha
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!