SHARE
TWEET

Exact sum of real numbers

a guest Aug 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace Exact_real_number_sum
  5. {
  6.     class Program
  7.     {
  8.         static void Main(BigInteger[] numero)
  9.         {
  10.             BigInteger number = BigInteger.Parse(Console.ReadLine());
  11.             BigInteger actual = 0;
  12.  
  13.             for (int i = 0; i < number; i++)
  14.             {
  15.                 BigInteger n = BigInteger.Parse(Console.ReadLine());
  16.                 actual += n;
  17.             }
  18.  
  19.             Console.WriteLine(actual);
  20.         }
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top