shows highest factor of an input number

PHOTO EMBED

Thu Oct 05 2023 17:11:06 GMT+0000 (Coordinated Universal Time)

Saved by @yolobotoffender

#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;
   
    
}
content_copyCOPY