Guest User

Untitled

a guest
Apr 15th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #define N 100
  4. int main ()
  5. {
  6. double *i,*j,temp,*i1,*j1,temp1,*i2,*kin,*kin1,n,*kin2;
  7. double mas[N],mas1[N],mas2[N];
  8. int n,n1,n2;
  9.  
  10. printf("\n\t Vveditb kilkictb elemeHtiv - ");
  11. scanf("%d",&n);
  12. printf("\n\t Vveditb elemeHtu Macuvy : \n");
  13.  
  14.  
  15.  
  16. for (i=&mas[0],kin=&mas[n-1];i<kin;i++)
  17. {
  18. scanf("%lf",&mas[n]); // 3aHocumo daHi v Macuv
  19. }
  20. printf("\n\t OtPuMaHui Macuv:");
  21.  
  22. for(i=&mas[0],kin=&mas[n-1];i<kin;i++){
  23. for(j=&mas[0],kin=&mas[n-1];j<kin;j++){
  24. if ((j)>(j+1)){
  25. temp=*j;*j=*(j+1);*(j+1)=temp;
  26. } //coptyem eleMeHTu
  27. }
  28. }
  29.  
  30.  
  31. for (i=&mas[0],kin=&mas[n-1];i<kin;i++)
  32. printf(" \n\t %5.3lf",*mas[i]); // VuvoduMo Macuv
  33. getch();
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment