Prorgam not outputting variable : I am new to C++ and want to make a simple program to find common factors between 2 numbers. I am using MSYS2 to compile. My code compiles with no errors, however the program won't output anything after defining the lrg variable
Here is the code: 

    #include <iostream>
    #include <algorithm>
    using namespace std;
    int main() {
    int num1;
    int num2;
     std::cout << "Enter the first number:";
     std::cin >> num1;
     std::cout << "Enter the second number:";
     std::cin >> num2;
    int lrg = std::max(num1,num2);
     std::cout << "The largest number is " << lrg;
    for (int i = 0; i < lrg; i++) {
      if (num1 % i == 0 && num2 % i == 0) {
        std::cout << i;
      };
    };
    return 0;
    }
When I compile and run I do not get the largest number nor the common factors. Please tell me what I am doing wrong. Thanks!