Copyright ⓒ2003~ , LogiMASON.com
연구개발 문의는 팩스로만 가능합니다. Fax(02-990-0141)
White Paper
Please understand my incorrect and poor korean expression
글 수 199
char *SortRGB(int r,int g,int b)
{
char sort[5];
strcpy(sort,"---");
if(g<r && g>b) strcpy(sort,"RGB");
if(b<r && b>g) strcpy(sort,"RBG");
if(b<g && b>r) strcpy(sort,"GBR");
if(r<g && r>b) strcpy(sort,"GRB");
if(r<b && r>g) strcpy(sort,"BRG");
if(g<b && g>r) strcpy(sort,"BGR");
return(sort);
}
void masin()
{
printf("%s\n\r",SortRGB(1,2,3));
}
실행
RGB