Guest User

Untitled

a guest
Dec 11th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. int Sum = 0;
  2.  
  3. for (int x = 1; x < 1000; x++)
  4. {
  5. if (x % 3 == 0) Sum += x;
  6. else if (x % 5 == 0) Sum += x;
  7. Console.WriteLine("x = {0}, sum = {1}", x, Sum);
  8. }
Add Comment
Please, Sign In to add comment