Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
313 B
0
Indexable
Never

#include <iostream>
using namespace std;

int main()
{
	for (int i = 1; i < 101; i++) {
		if (i % 3 == 0 && i % 5 == 0) {
			cout << "FizzBuzz\n";
		}
		else if (i % 5 == 0) {
			cout << "Buzz\n";
		}
		else if (i % 3 == 0) {
			cout << "Fizz\n";
		}
		else cout << i << "\n";
	}
}