Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Pascal Tringle
//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 int j; for(int i=5; i>=1; i--) { for(j=1; j<=9; j++) { if(j>=i) { if(j<=((9-i)+1)) { if(((9-i)+1) ==j || i==j){ Console.Write("1"); } else{ if(((j-i)%2)==0){ if(j==5){ Console.Write((((9-i)+1)-5)+(((j-i)/2)==1?0:((j-i)/2))); }else{ Console.Write(((9-i)+1)-5); } } else{ Console.Write(" "); } } } else { Console.Write(" "); } } else{ Console.Write(" "); } } Console.Write("\n"); } } } }
run
|
edit
|
history
|
help
0
enum flag comparison
lab
prime
Min Max Sum Avg
Game Dev Challenge #1
Big numbers
First Program
Pascal Triangle
MVC Learning
cs001