Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using System.Numerics;
- using System.Text;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- int count = int.Parse(Console.ReadLine());
- List<int> numbers = new List<int>();
- for (int i = 0; i < count; i++)
- {
- numbers.Add(int.Parse(Console.ReadLine()));
- }
- int sum = numbers.Sum();
- Console.WriteLine(string.Join(" ", numbers));
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement