C언어 질문입니다. ^^
세나
주어진 문제 해결방법....곱셈을 하는데 *를 쓰지않고 , 로 곱셈하기질문 내용 :
다음의 main 함수에서 사용할 수 있는 mymultiplication 함수를 작성하라..
이 함수는 unsigned short integer a,b를 곱해
단 이 함수는 연산자 ‘*’ 를 사용하지 않고 이나, 의 연산자만 사용한다.
#include stdio.h
void main() {
unsigned short int a,b;
unsigned int c;
printf(input two unsigned integer values a and b);
scanf(%d %d, &a, &b);
c=mymultiplication(a,b);
printf(a*b = %d\n, c);
}
이걸 고쳐서 해야 하는 문제이구요...#include stdio.h
unsigned int mymultiplication(unsigned short int a, unsigned short int b)
{
unsigned int v = 0;
int c;
for (c = 0 ; c 32 ; c++)
if ((bc) & 1) v += ac;
return v;
}
이건 다른 분과 같이 짠건데....
libcd.lib(crt0.obj) : error lnk2001: unresolved external symbol _main
debug/abc.exe : fatal error lnk1120: 1 unresolved externals
이런 에러가 떠요 ㅠㅠ 어떻게 해야할지...