배열사용 희소행렬
- 최초 등록일
- 2006.12.23
- 최종 저작일
- 2006.01
- C언어
- 가격 2,000원
소개글
이 프로그램은 C언어로 코딩한 희소행렬 프로그램입니다. 자료구조 시간에 배열을 사용하여
희소행렬을 만드는 프로그램을 만들라고 할 때 직접 코딩한 소스입니다.
컴파일 실행환경
Visual Studio
본문내용
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#define MAX_COL 101
#define SIZE 50
//희소행렬, 3원소 쌍
typedef struct triple
{
int row;
int col;
int value;
}triple ;
//함수 선언
void menu() ;
void spCreate(int fs, int m, int n);
void transpoeF(int fs) ;
void spAdd() ;
void spSub();
void spMult();
int check(int fs,int s, int p) ;
void inputSP() ;
void printSP(int fs) ;
//행렬 생성
triple a[7][SIZE] ;
/*
triple a[1][SIZE]//행렬1
triple a[2][SIZE]//행렬2
triple a[3][SIZE]//덧셈
triple a[4][SIZE]//뺄셈
triple a[5][SIZE]//전치
triple a[0][SIZE]//곱셈
triple a[6][SIZE]//임시
*/
int input = 0 ;
int m, n = 0;
int main()
{
menu() ;
return 0 ;
}
void menu()
{
while(1)
{
system("cls") ;
printf("===== 메뉴 =====n");
printf("1. 희소행렬 생성n");
printf("2. 희소행렬 입력n");
printf("3. 희소행렬 전치n");
참고 자료
없음