Write a program that multiplies two hard-coded numbers, then prints the individual numbers out and prints their product out, all on separate lines. You can choose the two numbers that are multiplied together.

Respuesta :

Answer:

Written in Python:

num1 = 10

num2 = 15

print(num1)

print(num2)

print(num1 * num2)

Explanation:

The programs requires that two number be assumed and multiplied.

The program uses num1 and num2 to represent the two numbers (line 1 and line2)

These numbers were then initialized to 10 and 15, respectively (note that, you can replace these numbers with any number of your choice)

The next two lines then print num1 and num2

The last line prints the result of their multiplication

However, line by line explanation is as follows:

This line initializes num1 to 10

num1 = 10

This line initializes num2 to 15

num2 = 15

This line prints num1

print(num1)

This line prints num2

print(num2)

This line prints the product of num1 and num2

print(num1 * num2)