Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
http://codegolf.stackexchange.com/questions/82526/sum-it-up-with-a-digital-triangle C# solution
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here f(new int[]{7, 5, 0, 9, 7,3 ,5 ,2 ,5 ,7 ,4 ,6 ,6}.ToList()); } public static void f(List<int> a) { int x = a.Count; for (int s = 0; s<x ;s++) { Console.WriteLine(new String(' ',s)+string.Join(" ",a)); a=a.Take(x-s-1).Select((v,i)=>(a[i+1]+v)%10).ToList(); } } } }
run
|
edit
|
history
|
help
0
MyProfile_MEDALLA.java
Display the pattern like diamond by using c# for loop
Recur5
Оператор switch
png
Composition
Enumerable
Extract all possible substrings from a string
circular linked list
scasdxcd