Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
diagonal
//Title of this code //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[] a= new int[3,3]; int i,j,s=0; Console.WriteLine("enter the elements"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { a[i,j]= Int32.Parse(Console.ReadLine()); } } Console.WriteLine("enter the elements"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { Console.Write(a[i,j]+"\t"); } Console.WriteLine(); } for(i=0;i<3;i++) { for(j=0;j<3;j--) { if(i==j) { s=s+a[i,j]; } } Console.WriteLine(); } Console.ReadKey(); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
IP ADDRESS THING
Some Fibonacci
tst
The Fisher–Yates shuffle array extension method
Order of Ops 5 (easier)
Ref
basics of generics
Planet-D ver. 0.5
transform string to hex code
3
Please log in to post a comment.