Advertisement
Guest User

proga000

a guest
Jun 25th, 2013
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.99 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <locale.h>
  3. #include <conio.h>
  4. #include <stdlib.h>
  5.  
  6. int _tmain(int argc, _TCHAR* argv[])
  7. {
  8.     setlocale(LC_ALL,"Russian");
  9.     int j,i,n,m;
  10.     double **mas;
  11.      do
  12.      {
  13.    
  14.      
  15.      printf("введите размерность матрицы:");
  16.      scanf("%d",&n);
  17.      mas=(double**)calloc(n,sizeof(double*));
  18.      for(i=0;i<n;i++)
  19.      {
  20.      mas[i]=(double*)calloc(n,sizeof(double));
  21.      }
  22.      printf("Введите элементы матрицы mas[i][j]\n");
  23.      for(i=0;i<n;i++)
  24.      {
  25.      for(j=0;j<n;j++)
  26.      {
  27.      printf("Введите элементы матрицы mas[%d][%d]:",i,j);
  28.      scanf("%lf",&mas[i][j]);
  29.      }
  30.      }
  31.      printf("\nполучена матрица ",n);
  32.      for(i=0;i<n;i++)
  33.      {
  34.      for(j=0;j<n;j++)
  35.      {
  36.      printf("%5.3f\t",mas[i][j]);
  37.      }}
  38.      m=n*(n+1)/2;
  39.      printf("\nУпакованный вектор:%d");
  40.      scanf("%d",&m);
  41.      for(i=0;i<m;i++)
  42.      {
  43.      for(j=i;j<m;j++)
  44.      {
  45.      printf("%d",&m);
  46.      }
  47.      }
  48.      _getch();
  49.      return 0;
  50.      } while(1);
  51.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement