Computer Science, asked by kkant8439, 6 months ago

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 jainam001
0

Answer:

Good. Are u learning coding?

Similar questions