Advertisement
fqrmix

Source1(Last Lab)

Oct 26th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.71 KB | None | 0 0
  1. /* FUNCTIONS.CPP */
  2. #include "define.h"
  3. #include "functions.h"
  4.  
  5.  
  6. struct TableOfComplicate Table;
  7.  
  8. void input(int n, int m) {
  9.     int i;
  10.     int j;
  11.     for (i = 0; i < n; i++)
  12.         for (j = 0; j < m; j++) {
  13.             printf("Введите x,i,y для %d строки -- %d столбца\n", i + 1, j + 1);
  14.             scanf("%f %f %f", &Table.x[i][j], &Table.i[i][j], &Table.y[i][j]);
  15.             Table.complicate_value[i][j] = Table.x[i][j] + Table.i[i][j] * Table.y[i][j];
  16.             Table.module_complicate[i][j] = sqrt(pow(Table.x[i][j], 2) + pow(Table.y[i][j], 2));
  17.         }
  18.  
  19. }
  20.  
  21. void output(int n, int m) {
  22.     for (int i = 0; i < n; i++) {
  23.         for (int j = 0; j < m; j++) {
  24.             printf("%f ", Table.complicate_value[i][j]);
  25.         }
  26.         printf("\n");
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement