1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| using System; class ReverseEample { public static void Main() { int [] iArray = { 52, 72, 63, 110, 21 }; Console.Write( "Original order: " ); foreach ( int i in iArray) Console.Write(i + " " ); Console.WriteLine(); Array.Reverse(iArray); Console.Write( "Reversed order: " ); foreach ( int i in iArray) Console.Write(i + " " ); Console.WriteLine(); Console.ReadLine(); } } |
52 72 63 110 21
21 110 63 72 52
No comments:
Post a Comment