Hi, I am trying to write a program that will print out the factors of a number user inputted and than print the sum of the factors. I came up with this, everything works fine except the last output is way much bigger than the actual sum,, where am I wrong??Code:#include <iostream>using namespace std; int main() { int x; cin>>x; int i=2; int y=0; while(i<x) { if (x%i==0) { cout<<i<<"\n"; x=x/i; y=y+i; cout<<y<<"\n"; } else {i++;} } cout<<x; int z; z=x+y; cout<<z; }