Advertisement
Guest User

Untitled

a guest
Mar 21st, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication16
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. int x;
  13. int sum = 0;
  14.  
  15.  
  16. int y;
  17. x = int.Parse(Console.ReadLine());
  18. y = int.Parse(Console.ReadLine());
  19.  
  20. for (int i = x; i < y; i++)
  21. {
  22. sum = sum + i;
  23. if (sum %2 !=0 )
  24. Console.WriteLine(sum);
  25.  
  26. }
  27.  
  28.  
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement