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]
4 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]4 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
Which statement best describes one reason why assembly
posledela

Answer:

D. It allows programmers to write abbreviations instead of repeating calculations

7 0
2 years ago
What is the best low end pc recording software​
julsineya [31]

Explanation:

democreator

D3DGear

nvidia shadow play etc

8 0
3 years ago
Read 2 more answers
Juan has performed a search on his inbox and would like to ensure that the results only include those items with
lubasha [3.4K]

Answer:

The Refine command group

Explanation:

8 0
3 years ago
In 25 words or fewer, identify what calendar feature the recurring task function copies.
alexdok [17]
Shhsnanwnwnsjssnsnnwnsn
7 0
4 years ago
You have posted some embarrassing photos of a friend onto the Internet. After
e-lub [12.9K]

Answer:

C

Explanation:

4 0
3 years ago
Other questions:
  • 1. What are the two things the base of a number system tells you? After describing these two things, illustrate each with exampl
    6·1 answer
  • How can you create the first row of the table as the header of the table?
    8·1 answer
  • In Java the ______________are not objects. All of the rest areobjects, or any ___________ is called as object.
    10·1 answer
  • Use the SAS dataset insure to create a dataset, work.insure10, that (a) only reads in the variables Name, Policy, Company, PctIn
    9·1 answer
  • Which level of education do most peoplebecoming a broadcast analyst obtain?
    13·2 answers
  • Write a C++ programthat simulates a cash register. The user should keeptyping
    5·1 answer
  • The common programming structure that implements "conditional statements" is called an____ statement.
    7·1 answer
  • Alisa Miller claims that today's college graduates:
    7·1 answer
  • A user calls the help desk to report that a mobile device exhibits very slow performance. What could cause this problem
    9·1 answer
  • I NEED HELP!! THIS IS 3D COMPUTER MODELING COURSE IN CONNEXUS
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!