Guest User

Untitled

a guest
Dec 10th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int a=0;
  9.  
  10. //Pętlą WHILE
  11. while (a<300)
  12. {
  13. cout<<a<<endl;
  14. a=a+1;
  15. }
  16.  
  17. a=0;
  18.  
  19. // Pętlą DO WHILE
  20. do
  21. {
  22. cout<<a<<endl;
  23. a=a+1;
  24. }
  25. while(a<300);
  26.  
  27. //Pętlą FOR
  28. for(a=0;a<301;a=a+1)
  29. {
  30. cout<<a<<endl;
  31. }
  32.  
  33.  
  34. }
Add Comment
Please, Sign In to add comment