Untitled

mail@pastecode.io avatar
unknown
c_cpp
10 months ago
352 B
2
Indexable
Never
#include <iostream>

int main()
{
    int i;
    for (i = 1; i <= 100; i++) {
        if (i % 3 == 0) {
            std::cout << "Fizz";
        }
        if (i % 5 == 0) {
            std::cout << "Buzz";
        }
        if (i % 5 != 0 && i % 3 != 0) {
            std::cout << i;
        }
        std::cout << "\n";
    }
}