Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int start = int.Parse(Console.ReadLine());
  10.             int end = int.Parse(Console.ReadLine());
  11.  
  12.             int sum = 0;
  13.             for (int i = start; i <= end; i++)
  14.             {
  15.                 if (i % 2 == 0)
  16.                 {
  17.  
  18.                 }
  19.  
  20.                 else
  21.                 {
  22.                     sum += i;
  23.                 }
  24.             }
  25.  
  26.             Console.WriteLine(sum);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement