Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleInputOutput
- {
- public static class SumOfN
- {
- public static void Main()
- {
- long n = long.Parse(Console.ReadLine());
- decimal sum = 0.00m;
- decimal number = decimal.MinValue;
- for (int i = 0; i < n; i++)
- {
- number = decimal.Parse(Console.ReadLine());
- sum += number;
- }
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement