using System;
public class Program
{
public static void Main()
{
int[] arr= {21,52,45,23,65};
int i;
/* Same order
for(i=0;i<=arr.Length;i++)
{
Console.Write(' '+arr[i]);
}*/
// Reverse Order
for(i=4;i>=0;i--)
{
Console.Write(' '+arr[i]);
}
}
}
Output:
65 23 45 52 21.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Print an array in Reverse order:
Program:
Output: