Tuesday, 27 November 2012

Ascending Order

using System;
using System.Collections.Generic;
using System.Text;

namespace ascending_order
{
class ascend
{
static void Main(string[] args)
{
int[] a=new int [20];
int t,i,j,n;
Console.WriteLine("\tASCENDING ORDER");
Console.WriteLine("\t***************");
Console.WriteLine("Enter the no of Elements");
n = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the Elements one by One");
for (i = 1; i <= n; i++)
{
a[i] = int.Parse(Console.ReadLine());
}
Console.WriteLine("\nASCENDING ORDER");
for (i = 1; i <= n; i++)
{
for (j = i + 1; j <= n; j++)
{
if (a[i] > a[j])
{
t = a[i];
a[i] = a[j];
a[j] = t;
}
}
Console.WriteLine("{0}", a[i]);
}

}
}
}

8 comments:

  1. I think you have a long story to share and i am glad after long time finally you cam and shared your experience.
    Java training in Chennai

    Java training in Bangalore

    ReplyDelete
  2. Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  3. This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.
    python Course in Pune
    python Course institute in Chennai
    python Training institute in Bangalore

    ReplyDelete

  4. This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb.
    This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here 


    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete




  5. Thanks For Sharing Your information Please keep updating us The Information Shared Is Very valuable Time Just Went On redaing The article Python Online Training Data Science Online Training Aws Online Training Hadoop Online Training

    ReplyDelete