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
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
Social Sciences,
2 months ago
Social Sciences,
2 months ago
Hindi,
2 months ago
Science,
4 months ago
Math,
10 months ago
Chemistry,
10 months ago