fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int znak;
  6. cin>>znak;
  7. if(znak>1000){
  8. return 0;
  9. }
  10. if (znak==0){
  11. return 0;
  12. }
  13. while(znak!=0){
  14. cout<<znak;
  15. cout<<" ";
  16. znak=znak-1;
  17. if (znak==0)
  18. cout<<" "<<'\n';
  19. if (znak==0)
  20. cout<<"NOWY ROK!!";
  21.  
  22. }
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 5296KB
stdin
10
stdout
10 9 8 7 6 5 4 3 2 1  
NOWY ROK!!