Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using System;
  2.  
  3. class ExactSumOfRealNumbers
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.  
  9.         decimal sum = 0m;
  10.  
  11.         for (int i = 0; i < n; i++)
  12.         {
  13.             sum += decimal.Parse(Console.ReadLine());
  14.         }
  15.  
  16.         Console.WriteLine(sum);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement