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
Alina [70]
2 years ago
14

How to write the algorithm to calculate the square of five numbers

Computers and Technology
2 answers:
ioda2 years ago
6 0

Answer:

1. A = 7 and B = 12 here...

2. A^2 = 49 thus final answer will have 9 at units place and 4 is carried to add later.

3. Given number multiplied by 'B' => 127*12 = 1524

4. A*B => 12*7 = 84

5. 1524+84 = 1608 ..... ( step 3 + step 4 )

6. 1608+4 =1612 .... (4 is carried as stated in step 2)

7. Now, 16129 is the answer... (From step 2 and 6)

Explanation:

Divide the number in two parts with one part containing only the number at unit's place say part 'A', and other part say 'B', containing the remaining number.

Now square the number at unit's place. The square will be one of these; {0,1,4,9,16,25,36,49,64,81}. The unit's place digit in this square is the unit's place digit in actual final answer.Write it in the answer. If the square of digit at unit's place is a two digit no like from 16 to 81 in above set; write only the digit at unit's place from this square in the final answer and carry the remaining digit.

Multiply the actual number to be squared by part 'B'(the remaining part than the number at unit's place as described in step 1 ).

Multiply the parts 'A' and 'B'.

Add results of step 3 with results of step 4.

Add the carried digit from step 2 to the sum in prior step, that is step 5.

Now write this sum before the number we wrote at unit's place of final answer in step 2.

This number we now obtain from step 7, is the square of our number.

Scilla [17]2 years ago
6 0

Answer:

1.Start Algorithm

2.Enter first number

3.Enter second number

4.Enter third number

5.Enter fourth number

6.Enter fifth number

7.Add five number

8.display five number / 2

9.Display result

10.End Algorithm

Explanation:

You might be interested in
Headphones are an example of _____.
katen-ka-za [31]
The Answer Is An Output Device 


3 0
3 years ago
Read 2 more answers
What is one purpose of an essay’s conclusion paragraph?
vova2212 [387]
The purpose of the conclusion paragraph is not only to wrap up the essay, but also to show the strong and central points in the essay alone. Since you are wrapping up the essay, it's your final paragraph and you have to clearly state all of your points and what and why the essay is written (depends on what you are talking about). But, the one purpose of an essay's conclusion is to clearly state the central points of the essay.
3 0
3 years ago
If a database was being used to track sales, a customer who buys a lot of items would be a good example of how two tables could
3241004551 [841]

Answer:True

Explanation:

7 0
2 years ago
2. In many jurisdictions a small deposit is added to containers to encourage people to recycle them. In one particular jurisdict
RUDIKE [14]

Answer:

Here is the Python program:

small_container = int(input("Enter the number of small containers you recycled?"))

large_container = int(input("Enter the number of large containers you recycled?"))

refund = (small_container * 0.10) + (large_container * 0.25)

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund)))

Explanation:

The program first prompts the user to enter the number of small containers. The input value is stored in an integer type variable small_container. The input is basically an integer value.

The program then prompts the user to enter the number of large containers. The input value is stored in an integer type variable large_container. The input is basically an integer value.

refund = (small_container * 0.10) + (large_container * 0.25)  This statement computers the refund that will be recieved for returning the small and larger containers. The small containers holding one litre or less have a $0.10 deposit so the number of small containers is multiplied by 0.10. The large containers holding more than one litre have a $0.25 deposit so the number of large containers is multiplied by 0.25. Now both of these calculated deposits of containers of each side are added to return the refund that will be received for returning these containers. This whole computation is stored in refund variable.

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund))) This print statement displays the refund in the format given in the question. The output includes a $ sign and displays exactly two decimal places by using {0:.2f} where .2f means 2 decimal places after the decimal point. Then the output is represented in floating point number using. format(float) is used to specify the output type as float to display a floating point refund value up to 2 decimal places.

5 0
3 years ago
Carmen has met new people online that she enjoys talking to. One of these people has asked her to meet at the park in person and
slavikrds [6]

Answer:

Don't go to the park!!

Explanation:

You don't know the person personally and they could be acting and hurt you. Especially if they tell you not to tell someone. So don't go!

8 0
2 years ago
Other questions:
  • Help plz
    5·1 answer
  • In a eukaryotic cell, DNA is found in
    12·2 answers
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • A professor is working with five teams in his marketing research class. He decides to experiment with path-goal theory in helpin
    11·1 answer
  • Give an O(log m + log n)-time algorithm that takes two sorted lists of sizes m and n, respectively, as input and returns the ith
    7·1 answer
  • What is the result of executing the following code? You can assume the code compiles and runs. #include using namespace std; voi
    6·1 answer
  • What is 4x+2x(-3-3) thanku
    11·2 answers
  • Ms office suite comes with its own set of pictures in the​
    5·1 answer
  • What are the five Ws?<br> (I don’t even know what this means)
    5·2 answers
  • 9
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!