int main() {
int n;
std::cout<<"Enter the number"<<std::endl;
std::cin>>n;
code++++++
int sum = 0;
for (int i=1; i<n/2; i++){
if (n%i == 0) {
sum += i;
}
}
std::cout<<"Sum of factors of "<<n<<": "<<sum<<std::endl;
Answers
Answered by
0
Answer:
Good. Are u learning coding?
Similar questions
Hindi,
2 months ago
English,
2 months ago
History,
2 months ago
Math,
6 months ago
English,
6 months ago
Computer Science,
11 months ago
India Languages,
11 months ago