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
GREYUIT [131]
4 years ago
12

Get two positive integers from the user. Write code to multiply the two numbers together using only addition or subtraction. You

should not use the '*' operator. Remember that x*y is simply x+x+x+...+x, y times. You may use eitnher a for loop or a while loop
Computers and Technology
1 answer:
padilas [110]4 years ago
8 0

Answer:

number1 = int(input("Enter the first number: "))

number2 = int(input("Enter the second number: "))

result = 0

for i in range(number1):

   result += number2

print(str(result))

Explanation:

Ask the user for two numbers

Initialize result as 0 to hold the multiplication of the numbers

Create a for loop that iterates "number1" times. In each iteration, add number2 to the result.

When the loop is done, print the result

You might be interested in
Please refer to the MIPS solution in the question above. How many total instructions are executed during the running of this cod
Digiron [165]

Answer:

MIPS designs are used in SGI's computer product line; in many embedded systems; on Windows CE devices; Cisco routers; and video consoles such as the Nintendo 64 or the Sony PlayStation, PlayStation 2 and PlayStation Portable. Most recently, NASA used one of them on the New Horizons probe1.

Explanation:

The earliest MIPS architectures were 32-bit fsfs (generally 32-bit wide data paths and registers), although later versions were implemented in 64-bit. There are five backward compatible revisions of the MIPS instruction set, called MIPS I, MIPS II, MIPS III, MIPS IV, and MIPS 32/64. In the last of these, MIPS 32/64 Release 2, a record control set is defined to major. Also several "extensions" are available, such as the MIPS-3D, consisting of a simple set of floating point SIMD instructions dedicated to common 3D tasks, the MDMX (MaDMaX) made up of a more extensive set of integer SIMD instructions that use 64-bit floating-point registers, MIPS16 which adds compression to the instruction flow to make programs take up less space (presumably in response to the Thumb compression technology of the ARM architecture) or the recent MIPS MT that adds multithreading functionalities similar to the HyperThreading technology of Intel Pentium 4 processors

3 0
3 years ago
Read 2 more answers
Which is an example of an operating system? (5 points)
marta [7]

Answer:

Windows

Explanation:

6 0
3 years ago
A business letter is not written:
Andreas93 [3]

Answer: the answer is b

Explanation:Bc why would they make a business letter 2 someone else

5 0
3 years ago
Convert 578.2 into hexadecimal​
Digiron [165]

Answer:

242.33333333

Explanation:

578.2

578÷16 -> 36 R 2

36 ÷16 -> 2 R 4

242.

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.2 x 16 -> 3.2 F 3

.33333333

242.3333333

4 0
3 years ago
Unix is called a(n) ___________ operating system because it can run on a desktop pc or a server. operating systems installed on
S_A_V [24]
Multiuser
guest
unix
I don't know the last two answers
4 0
3 years ago
Other questions:
  • Which forensics tool would you use to reveal recent pages viewed via the internet explorer browser?
    10·1 answer
  • Write a program in c++ that asks the user for a sequence of n​integers, where the user provides the number of elements n​ then e
    12·1 answer
  • State two functions of windows environment​
    9·1 answer
  • How long does it take to be placed in a class on flvs?
    14·1 answer
  • How can volunteering yo help plan fundraiser for your team or club be a way to develop your strengths?
    13·1 answer
  • . What is the difference between a combinational circuit and sequential circuit? Give example of each.
    8·1 answer
  • The term integration mean?
    7·2 answers
  • Write a program named as reverse.c that reads a message, then prints the reversal of the message. The output of the program shou
    7·1 answer
  • HELP FAST PLS<br> Do you care more about avoiding fees/costs, accumulating perks, convenience, etc?
    14·2 answers
  • What can be used to help diagnose and fix computer hardware problems?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!