Untitled
Anonymous
c_cpp
10/18/2023 5:51 PM
616 B
18
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...