fork(1) download
  1. using System;
  2. using static System.Console;
  3.  
  4. public class Program {
  5. public static void Main() {
  6. var soma = 0;
  7. foreach (var elemento in Enum.GetValues(typeof(TrianguloLetra))) soma += (int)elemento;
  8. WriteLine(soma);
  9. }
  10. public enum TrianguloLetra {
  11. a = 1, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
  12. }
  13. }
  14.  
  15. //https://pt.stackoverflow.com/q/72986/101
  16.  
Success #stdin #stdout 0.03s 22464KB
stdin
Standard input is empty
stdout
351