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
1 answer:
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
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
Is it apprenticeship???:D
Answer: telling the animators that an entire scene must be reworked
Explanation:
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>
Answer:
False because the inside could be dirty and cause problems.
Explanation: