[자료(資料)구조] 재귀함수
페이지 정보
작성일 23-01-27 20:45
본문
Download : 재귀함수.hwp
ifstream fin(`input.txt`);
void Findcomp(int image[중요] [100],int row,int col, int label,int m, int n)
[자료(資料)구조] 재귀함수
Findcomp(image,row-1,col,label,m,n);
순서
자료(資料)구조 수업에 나오는 레폿
자료구조 재귀 재귀함수
if( col > 0 && image[row][col-1] == 1)
#include
fin>>command;
{
Download : 재귀함수.hwp( 93 )
Findcomp(image,row,col-1,label,m,n);
설명
using namespace std;
//아래쪽을 본다
//왼쪽을 본다
자료구조 수업에 나오는 레폿
//오른쪽을 본다.
Findcomp(image,row+1,col,label,m,n);
//위를 본다
int image[100][100];
#include
위한 소
레포트 > 공학,기술계열
void main()
Findcomp(image,row,col+1,label,m,n);
string str; //int형의 배열에 집어넣기 위해 string형 변수 선언
{
int i,j,m,n;
if( row > 0 && image[row-1][col] == 1)
}
if( row < m-1 && image[row+1][col] == 1)
if( col < n-1 && image[row][col+1] == 1)
image[row][col] = label;
int command; //몇번의 실행을 할것인가에 대한 명령을 위한 함수
#include
다.


