HOME

Start

Control Statements

Array

Function

Structure

Pointer

File

Projects

 

 

 

 

 

 

C programing

Ckalari.com is the No.1 website to get the best of C programs, free source codes, projects in c language……  

Lenear sorting in c language

#include<stdio.h>

#include<conio.h>

void main()

     {

       int limit,num[100],temp,i,j;

    clrscr();

    printf("\nWhat is the limit OR how many numbers\n");

    scanf("%d",&limit););

    printf("\n Enter the numbers\n");

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

    {

      scanf("%d",&num[i]);

       }

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

       {

      for(j=0;j<limit;j++)

      {

        if(num[i]<=num[j])

        {

          temp=num[i];

          num[i]=num[j];

            num[j]=temp;

        }

      }

    }

    printf("\n\n\n\n");

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

    {

      printf("%d ",num[i]);

          }

    getch();

     }

Copyright © 2007-2008 www.ckalari.com