Computer Science, asked by stideny, 4 months ago

1. Print the first 7 odd numbers in descending order using for loop in c++.
pls friend do this As my exam is going on.
If you don't know then leave .
Do not spam pls..
help me pls
verified answer only with details.. pls mates.... ​

Answers

Answered by Anonymous
1

Answer:

#include<iostream>

using namespace std;

int main() {

int n, i, a;

cout << "Enter a number:";

cin>>n;

cout << "List is :";

for (i = n - 1; i >= 0; i--) {

a = 1 + i * 2;

cout << a << " ";

}

return 0;

}

Output

Enter a number:5

List is :9 7 5 3 1

Textile

Similar questions