바로이순간의 공간

  • 홈
  • 태그
  • 방명록

행렬의 곱셈 3

3x3 행렬의 곱셈

#include <stdio.h> #define SIZE 3 void matMult(double a[][SIZE], double b[][SIZE], double c[][SIZE]) { int i, j, k; double x; for(i=0;i<SIZE;i+=1) { for(j=0;j<SIZE;j+=1) { x=0.; for(k=0;k<SIZE;k+=1) { x=x+a[i][k]*b[k][j]; } c[i][j]=x; } } } int main() { int i, j; double x; double a[SIZE][SIZE], b[SIZE][SIZE], c[SIZE][SIZE]; for(i=0;i<SIZE;i+=1) { for(j=0;j&lt..

c·c++/c 프로그래밍 2013.10.02

행렬의 곱셈 등 - 배열의 크기가 주어졌을 때

#include <stdio.h> #include <stdlib.h> #define SIZE 2 void matAdd(double a[][SIZE], double b[][SIZE], double c[][SIZE], int rows, int cols) { int i, j; for(i=0;i<rows;i++) for(j=0;j<cols;j++) c[i][j]=a[i][j]+b[i][j]; } void matSub(double a[][SIZE], double b[][SIZE], double c[][SIZE], int rows, int cols) { int i, j; for(i=0;i<rows;i++) for(j=0;j<cols;j++..

c·c++/c 프로그래밍 2012.03.26

행렬의 덧셈, 뺄셈, 곱셈 - 동적할당

#include <stdio.h> #include <stdlib.h> void matAdd(double **a, double **b, double **c, int rows, int cols) { int i, j; for(i=0;i<rows;i++) for(j=0;j<cols;j++) c[i][j]=a[i][j]+b[i][j]; } void matSub(double **a, double **b, double **c, int rows, int cols) { int i, j; for(i=0;i<rows;i++) for(j=0;j<cols;j++) c[i][j]=a[i][j]-b[i][j]; } void matMult(double **..

c·c++/c 프로그래밍 2012.03.25
이전
1
다음
더보기
프로필사진

바로이순간의 공간

  • 분류 전체보기 (542)
    • 알고리즘, 자료구조 (27)
      • 자료구조 (11)
      • 알고리즘 (16)
    • Blockly webc (10)
      • Blockly webc (5)
      • svl에 대하여 (5)
    • c·c++ (357)
      • c 프로그래밍 (314)
      • c++ 프로그래밍 (43)
    • 자바·파이썬·자바스크립트 (35)
      • 파이썬 프로그래밍 (17)
      • Java 프로그래밍 (9)
      • 자바스크립트 (9)
    • 기타 (102)
      • 컴퓨터공학 (63)
      • 과학 (4)
      • 수학 (11)
      • 번역 (24)

Tag

애너그램, 자바스크립트, CIN, 순환호출, 피보나치 수열, 진법변환, 단어세기, c언어 독학, 재귀호출, 행렬의 곱셈,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바