Untitled
unknown
c_cpp
2 years ago
460 B
3
Indexable
#include <iostream>
using namespace std;
int main()
{
int razmer;
cin >> razmer;
for (int i = 1; i <= razmer; i++) {
for (int j = 1; j <= razmer; j++) {
if (j % 2 == 0 and j % 5 != 0) {
cout << '*';
}
if (j % 2 != 0 and j % 5 != 0) {
cout << '-';
}
if (j % 5 == 0) {
cout << '@';
}
}
}
}Editor is loading...