Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
better o/p of factor problem
#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++) { cout<<"factor of "<<rahul[j]<<" is: "; for(int k=*max_element(rahul.begin(),rahul.end());k>=1;k--) { if(rahul[j]%k==0) cout<<rahul[j]/k<<" "; } cout<<endl; } return 0; }
run
|
edit
|
history
|
help
1
threadpool01
TemplateDoubly
pure virtual function with non-fixed number of parameters
Expected GCD
11
Hangman
Varadic macro
Projekt misker
c++ car racing game
ThreadContext