УЗОРЫ
unknown
c_cpp
2 years ago
332 B
7
Indexable
//КОШЕЛЕВ ДАНИИЛ
//Узоры
#include <iostream>
using namespace std;
int main() {
int YI;
cin >> YI;
for (int i = 1; i < YI+1; i++) {
if (i % 2 == 1 and i % 5 != 0) {
cout << "-";
}
if (i % 2 == 0 and i % 5 != 0) {
cout << "#";
}
if (i % 5 == 0) {
cout << "@";
}
}
}Editor is loading...