I created this using C++ and this gives the largest prime factor of a number.But my problem is if I try to find the largest prime factor of a very large number (12 digit number) it gives an error or it doesn't give an answer. I'm new to programming so please be kind enough to help :)#include <iostream>#include <cmath>using namespace std;int main(){   int number;   cout <<  Enter the number \t  ;   cin >> number;   for( int counter = number ; counter >1 ; counter --){     int test = number%counter;     int rem;        if( test == 0){        for(int i =2 ; i <= sqrt(counter) ; i++){             rem= counter%i;            if(rem == 0)                break;        }        if( rem != 0){        cout << counter <<  IS THE LARGEST PRIME FACTOR OF << number <<endl;        break;       }    }            }            }
Finding the largest prime factor of a 12 digit number
c++;c;primes;integer