Ответы 1
1. #include
using namespace std;
int main() {
int a;
cout << "Введите значение переменной a: ";
cin >> a;
while (a > 0) {
cout << a << endl;
a--;
}
return 0;
}
2. #include
using namespace std;
int main() {
int a;
cout << "Введите значение переменной a: ";
cin >> a;
while (a < 1000) {
if (a % 2 != 0) {
cout << a << endl;
}
a++;
}
return 0;
}
3. #include
using namespace std;
int main() {
for (int i = 1; i <= 100; i++) {
if (i % 2 != 0) {
cout << i * i << endl;
}
}
return 0;
}
Надеюсь, что код будет полезен!
using namespace std;
int main() {
int a;
cout << "Введите значение переменной a: ";
cin >> a;
while (a > 0) {
cout << a << endl;
a--;
}
return 0;
}
2. #include
using namespace std;
int main() {
int a;
cout << "Введите значение переменной a: ";
cin >> a;
while (a < 1000) {
if (a % 2 != 0) {
cout << a << endl;
}
a++;
}
return 0;
}
3. #include
using namespace std;
int main() {
for (int i = 1; i <= 100; i++) {
if (i % 2 != 0) {
cout << i * i << endl;
}
}
return 0;
}
Надеюсь, что код будет полезен!
Премиум статус
Получайте самые быстрые
ответы на свои вопросы
ответы на свои вопросы
У вас остались
вопросы?
вопросы?