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:
Local Area Network (LAN), Hope this helps
I think it is better to ask questions and troduce yourself
If Lucy wants to move data from column A to column N within the same worksheet, she needs to use the Ctrl + c and Ctrl + v keys. But before these key combination, she needs to select first the column A by merely clicking the column A, then ctrl+c and ctrl+v.
You should select the configure DHCP options for proxy DHCP option if the local DHCP server is a Microsoft DHCP server, if you select this option the DHCP server is automatically configured to forward the PXE requests to the WDS server. If the local DHCP server is not a Microsoft DHCP server, you have to configure the DHCP server manually to forward the request to the WDS server.