Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
finding 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<=*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
exception
cppPyProperty
A number is prime or not
Изволов#2
Elevator 3
11340 v3.1
segmented sieve
D.E.Shaw Binary Search Question
OOP
Meeting_Leandro