Sorting 2 arrays & merging into 1 - c# program, DOT NET Programming

Assignment Help:

Sorting 2 Arrays & Merging into 1 - C# Program

Hello, i didn't find the correct way to implement Array in my project. I am beginner for this language.  Please suggest me some examples.


Related Discussions:- Sorting 2 arrays & merging into 1 - c# program

Abstract classes, What are abstract classes? The features of the abstra...

What are abstract classes? The features of the abstract class are as follows:- 1.     You can not create an object of the abstract class. 2.     The Abstract class is des

Enable asp.net polling, How to Enable ASP.NET polling? All our database...

How to Enable ASP.NET polling? All our database side is configured in order to get the SQL Cache working in the ASP.NET side we require to do some configuration in the web.conf

Login page, how to connect login page with my database and check the values...

how to connect login page with my database and check the values with the database.

Bcp utility in sql server, What is BCP utility in SQL SERVER? The Bulk ...

What is BCP utility in SQL SERVER? The Bulk Copy Program (BCP) is a command line utility by which you can import & export large amounts of data in and out of the SQL SERVER dat

Can we run dot.net in unix platform, Can we run DOT.NET in UNIX platform? ...

Can we run DOT.NET in UNIX platform? One of the drawbacks of using Visual Studio.NET and the .NET framework to develop applications has been the lack of cross-platform support.

Show the structure of the global.asax file, Question: (a) Write extrac...

Question: (a) Write extract codes to show the structure of the Global.asax file. (b) Outline four classes that allow you to work with File Streams. (c) When working with

I want a c# school project, I want a C# school project Project Descripti...

I want a C# school project Project Description: The project is made in C# and haves a database connection. We have some small problems asking up data from the database.

Give benefits of asp.net web controls, Question: (a) Give four benefit...

Question: (a) Give four benefits of ASP.NET Web Controls. (b) List and explain any five properties of the ValidationSummary control. (c) Multiple Web Form controls ca

Hash table, What is a Hash Table? You can access an array using the IND...

What is a Hash Table? You can access an array using the INDEX value of that array, but how many times you know the real value of the index. The Hashtable provides a way of acce

What are value types and reference types, What are value types and referenc...

What are value types and reference types?  Value type - bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort. Value types are

Amy

2/12/2013 1:15:15 AM

Hey this a very easy code for your problem try this.

Program:

using System;

class SortArray

{

  public static void Main()

 {

   int [] A={127,157,240,550,510};  

   int [] B={275,157,750,255,150};

   int CLength=(A.Length +B.Length);

   int [] C=new int[CLength];

   int i=0,j=0,k;    

  Console.Writeline ("Sorted array list : ");

   for(k=0;k<=(i+j);k++)

  {

    if(A[i]<=B[j])

   {

    C[k]=A[i];

    Console.Write (C[k] + " ");

     if(i<4) 

    {

     i++;

    }

   }

    else

   {

    C[k]=B[j];

    Console.Write (C[k] + " ");

     if(j<4)

    {

     j++;

    }

   }

  }

   for(i=0;i<CLength;i++)

  {

   Console.Write(C[i] + " ");

  }

  Console.ReadLine();

 }

}

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd