Advertisement
Guest User

praca domowa 21.11

a guest
Nov 21st, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n=1,i,a;
  6. cin>>a;
  7. for(i=1;i<a;i++)
  8. {if(i%2!=0)
  9. {cout<<i<<endl;
  10.  
  11. n++;}}
  12.  
  13. cout<<"Liczb nieparzystych jest "<<n<<endl;
  14.  
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement