#include <stdio.h>

int magicbox(i) {
    i += 4;
    return i;
}

int main() {
    int i;
    printf("a number to put in : \n");
    scanf("%d", &i);
    magicbox(i);
    return 0;
}

์˜ค๋ฅ˜ ๋ฌธ๊ตฌ type of 'i' defaults to 'int'

๋ฌธ์ œ : ํ•จ์ˆ˜ ์ •์˜ ์‹œ ์ธ์ž์˜ ํ˜•ํƒœ๋ฅผ ์„ ์–ธํ•ด ์ฃผ์ง€ ์•Š์Œ.

ํ•ด๊ฒฐ : ํ•จ์ˆ˜ ์„ ์–ธ ์‹œ ๊ด„ํ˜ธ ์•ˆ์— ์ธ์ž์˜ ํ˜• ์„ ์–ธํ•ด์ฃผ๋ฉด ํ•ด๊ฒฐ.

 

magicbox( i ) => magicbox( int i )

๋ฐ˜์‘ํ˜•

+ Recent posts