Sinux1

PS5Q3 cs 111

Mar 11th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     for (int x = 1; x <= 1000; x++)
  7.         if ( x % 5 == 0 )
  8.         {
  9.             cout << -x << endl;
  10.         }
  11.         else
  12.         {
  13.             cout << x << endl;
  14.         }
  15.  
  16.  
  17.     return 0;
  18. }
Add Comment
Please, Sign In to add comment