C programming

Saturday, January 17, 2009

#include #include void main() { int nm[100],i=0,j,k,key,a=0; clrscr(); printf("Enter data:\n"); while(a!=-1) { scanf("%d",&a); nm[i]=a; i++; } for(j=1;j=0&&nm[k]>key) { nm[k+1]=nm[k]; k--; } nm[k+1]=key; } printf("The sorted list is="); for(j=0;j printf("%d ",nm[j]); getch(); }

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP