LauriFriberg

laskuri.cpp, counter.cpp, 0...1000, Lauri Friberg 2018

May 30th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. // laskuri.cpp, counter, by Lauri Friberg 2018. Laskee numerot 0:sta 1000:n.
  2. // Counts numbers from 0 to 1000.
  3.  
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. int laskuri(); //protype
  9.  
  10. main() //main function
  11. {
  12.  laskuri();
  13.  return 0;
  14. }
  15.  
  16. int laskuri() //function definition
  17. {
  18.  int i;
  19.  for (i=0; i<=1000; ++i)
  20.  {
  21.   cout << i << " ";
  22.  }
  23.  return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment