#include <iostream> using namespace std; int main() { int n; cout<<"enter a number: "; cin>>n; cout<<endl; int i; for (i=1 ; i<n ; i++){ if (n%i==0){cout<<i<<" ";} } }
To embed this project on your website, copy the following code and paste it into your website's HTML: