Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ExactSumOfRealNumbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int count = int.Parse(Console.ReadLine());
- decimal sum = 0;
- for (int i = 0; i < count; i++)
- {
- decimal number = decimal.Parse(Console.ReadLine());
- sum += number;
- }
- Console.WriteLine(decimal.Parse(sum.ToString()));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment