Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using System.Globalization;
  5. namespace DataTypesAndVariablesExercise
  6. {
  7. public class MethodsAndFunctionsExcercise
  8. {
  9. static void Main()
  10. {
  11. {
  12. int num = int.Parse(Console.ReadLine());
  13.  
  14. int sum = 0;
  15. for (int i = 1; i <= num; i++)
  16. {
  17. char letter = char.Parse(Console.ReadLine());
  18. sum += letter;
  19. }
  20. Console.WriteLine($"The sum equals: {sum}");
  21. }
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement