Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #define N 100
- int main ()
- {
- double *i,*j,temp,*i1,*j1,temp1,*i2,*kin,*kin1,n,*kin2;
- double mas[N],mas1[N],mas2[N];
- int n,n1,n2;
- printf("\n\t Vveditb kilkictb elemeHtiv - ");
- scanf("%d",&n);
- printf("\n\t Vveditb elemeHtu Macuvy : \n");
- for (i=&mas[0],kin=&mas[n-1];i<kin;i++)
- {
- scanf("%lf",&mas[n]); // 3aHocumo daHi v Macuv
- }
- printf("\n\t OtPuMaHui Macuv:");
- for(i=&mas[0],kin=&mas[n-1];i<kin;i++){
- for(j=&mas[0],kin=&mas[n-1];j<kin;j++){
- if ((j)>(j+1)){
- temp=*j;*j=*(j+1);*(j+1)=temp;
- } //coptyem eleMeHTu
- }
- }
- for (i=&mas[0],kin=&mas[n-1];i<kin;i++)
- printf(" \n\t %5.3lf",*mas[i]); // VuvoduMo Macuv
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment