Hi there i can't get this simple factoring program to work it work's but it only show one factor of a number anyone there i can't get it any help there?? tnx and btw tnx salem for the hints and for correcting my code in translate thread tnx... here's the code..
I really can't get it.....Code:#include <iostream> #include <conio.h> using namespace std; int main() { int num; cout << "input num\n"; cin >> num; for(int a=1; a<=num; a++){ for(int b=1; b<=a; b++){ if(a*b==num){ cout << a << " and " << b << " is the factor of " << num; } } } getch(); }