Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
factor
#include <bits/stdc++.h> using namespace std; int main() { vector<int>rahul; int n; cout<<"Enter the total no that you want to factor of: "<<endl; cin>>n; cout<<"Enter the numers you wnt to factor:"<<endl<<endl; for(int i=0;i<n;i++) {int x;cin>>x;rahul.push_back(x);} for(int j=0;j<n;j++) { for(int k=1;k<=sqrt(*max_element(rahul.begin(),rahul.end()));k++) { if(rahul[j]%k==0) cout<<rahul[j]/k<<" "; } cout<<" The factor of: "<<rahul[j]<<" is 👈"<<endl; } return 0; }
run
|
edit
|
history
|
help
1
ForwardLiceSplice
Complete Over-Use of Functor Templates (Academic Experiment)
2d array sum
LIS
Einstein's Physics
Peg Grammar Parser Grasshopper Language
basic caculate ii
MemCpySetChar
Microsoft - MaxEmployeeAttendence (R repititions - 1st step towards DP solution)
Print reverese string non repeated chars