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
Leni [432]
3 years ago
6

1) The program reads an integer, that must be changed to read a floating point. 2) You will need to move that number into a floa

ting point register and then that number must be copied into an integer register. 3) You will need to extract the exponent from the integer register and stored in another register. 4) You will need to insert the Implied b
Computers and Technology
1 answer:
DochEvi [55]3 years ago
6 0

Answer:

1. Get the number

2. Declare a variable to store the sum and set it to 0

3. Repeat the next two steps till the number is not 0

4. Get the rightmost digit of the number with help of remainder ‘%’ operator by dividing it with 10 and add it to sum.

5. Divide the number by 10 with help of ‘/’ operator

6. Print or return the sum

# include<iostream>

using namespace std;

/* Function to get sum of digits */

class gfg

{

   public:

   int getSum(float n)

   {

   float sum = 0 ;

   while (n != 0)

   {

    sum = sum + n % 10;

    n = n/10;

   }

return sum;

}

};

//driver code

int main()

{

gfg g;

float n = 687;  

cout<< g.getSum(n);

return 0;

}

Explanation:

You might be interested in
Where could an identity theft access your personal information?
Naily [24]
They can hack into you email or your phone number thats all they need to find where you live how old you are and etc hope this helps

8 0
3 years ago
Read 2 more answers
Which activity does not allow a person to perform any work while at the shop
polet [3.4K]

Is it apprenticeship???:D

5 0
3 years ago
Which of these is outside the scope of an art director's responsibility?
Morgarella [4.7K]

Answer: telling the animators that an entire scene must be reworked

Explanation:

4 0
3 years ago
Read 2 more answers
When selecting font size in a document, ____ points equals one-inch-tall text?
IgorC [24]
Hello <span>Jhigg4685 
</span><span>

Answer: When selecting font size in a document, 72 points equals one-inch-tall text?


I hope this helps
-Chris</span>
3 0
3 years ago
When cleaning a computer, you need only worry about what you can see.
almond37 [142]

Answer:

False because the inside could be dirty and cause problems.

Explanation:

4 0
3 years ago
Other questions:
  • You are able to change the formatting of a table after it is inserted into a placeholder. True or false
    9·2 answers
  • The LTE (cellular telephone) standard supports only packet switching"". What cellular services are morst affected by this change
    15·1 answer
  • A typical, small, dry cell battery has a voltage of A. 6.0 volts. B. 1.0 volts. C. 12.0 volts. D. 1.5 volts.
    11·2 answers
  • Find the mistakes in the following code. Not all lines contain mistakes. Each line depends on the lines preceding it. Watch out
    14·1 answer
  • Assume that an array named salarySteps whose elements are of type int and that has exactly five elements has already been declar
    12·1 answer
  • 2. Who created the first photograph? How was this done?
    14·2 answers
  • Speed(?)
    5·1 answer
  • In which drawer do you find blocks that allow you to use the A and B buttons on your micro:bit?
    13·2 answers
  • What is Data rate?<br> What is BAUD RATE?<br> What is bandwidth?
    8·1 answer
  • Pleaseee help me with the typical situations of the icons(i already know for words but I have no idea for giving the situations
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!