#include <iostream>
class F {
    private:
        int k;
        int l;
    public:
        F(int m){
            l = m;
        }
        int get(){
            return k;
        }
        bool loop(){
            k++;
            if (k < l){
                return true;
            }else{
                return false;
            }
        }
};
int main() {
    F a(10);
    while (a.loop()) {
        std::cout << "Hello world!" << std::endl;
    }
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: