Guys..I'm trying to understand this coding and I can't understand the for loop. Can someone please explain it to me what happened there. Thank you
#include <iostream>
using namespace std;
int main()
{
long long int number;
cout << "Enter number to test: ";
cin >> number;
for(int x=2; x<(number/2); x++)
{
while(number%x==0)
number/=x;
}
cout << '\nLargest Prime: ' << number << '\n';
return 0;
}