Preview:
#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;
   
    
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter