Advertisement
a53

AfisareNumereImpare1

a53
Nov 23rd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin>>n;
  8. if(n%2==0)
  9. --n;
  10. for(int i=n;i>0;i-=2)
  11. cout<<i<<' ';
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement