Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OutputMatrix(double* massive, double** _matrix, int rows_count, int columns_count)
- {
- int massive_count = 0;
- for (int i = 0; i < rows_count; i++)
- {
- for (int j = 0; j <= columns_count; j++)
- {
- if(j == columns_count)
- {
- for(int k = 0; k < rows_count; k++)
- {
- (*_matrix)[(((i + 1) + k) * columns_count) + (j - i)] = massive[massive_count];
- massive_count++;
- }
- }
- else
- {
- (*_matrix)[(i * columns_count) + (j - i)] = massive[massive_count];
- massive_count++;
- }
- }
- }
- putchar('\n');
- putchar('\n');
- for (int i = 0; i < rows_count; i++)
- {
- for (int j = 0; j < columns_count; j++)
- printf("%.2f ", (*_matrix)[i * columns_count + j]);
- putchar('\n');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement