#include<iostream> /*this program calculates the Highest factor of an entered number*/
#include<iomanip>
using namespace std;
int main(){
int num;
int i=2;
cout<<"enter a number"<<endl;
cin>>num;
while(i<num/2){
if(num%i==0){
}
i=i+1;
}
cout<<"highest factor is "<<i<<endl;
return 0;
}
Comments