Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
384 B
1
Indexable
Never
#include <iostream>
using namespace std;
int main()
{

   
    for (int i = 1; i <= 100; ++i) {
       
        if (i % 3 == 0) {
            cout << "fizz";
        }
        if (i % 5 == 0) {
            cout << "buzz"<< "\n" ;
        }
        if (i % 3 == 0 && i % 5 == 0) {
            cout << "fizzbuzz"<< "\n";
        }
        cout << i << "\n";
    }
}