Facebook
From Ivory Lechwe, 6 Years ago, written in C++ with WinAPI.
Embed
Download Paste or View Raw
Hits: 297
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int x, b, z, a=10, i=1;
  5. cout<<"Wpisz x"<<endl;
  6. cin>>x;
  7. if (x==0){
  8.     cout<<"Blad!"<<endl;
  9. }
  10. else if(x==1){
  11.     while(x=10){
  12.         cout<<x<<endl;
  13.         x++;
  14.     }
  15. };
  16. else{
  17. z=x-1;
  18. while(z!=i)
  19. { a=a*10; i++;
  20. };
  21. b=10*a-1;
  22. while(b>a){
  23.         cout<<b<<endl;
  24.         b--;
  25.         }
  26. }
  27. return 0;
  28. }
  29.