|
From: Ioannis V. <no...@ho...> - 2002-05-04 00:51:44
|
I had forgotten something:
=20
=20
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Juliano
P=A6=C1vel Brasil Cust=A6=D2dio
Sent: Friday, May 03, 2002 8:52 PM
To: dev...@li...
Subject: [Dev-C++] crt0.o
I've juste installed Dev-C++ in my computer (Win2K) and I tried to
compile the simple program bellow, but I've got the error message
"C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The
Dev-C++ is installed in a different directory because I was trying to
fix this problem, but I was not succesfull in doing it.
=20
#include<stdio.h>
=20
char primo(long int);
=20
void main(void){=20
=20
int main(void) {
long int i;
=20
printf("Entre com um n=A8=B2mero: ");
scanf("%d",&i);
=3D> scanf("%ld", &i);
=20
printf("%c",primo(i));
getchar(); =20
return 0; /* not necessary in C99 */
=20
}
=20
char primo(long int x){=20
int i;
=20
for(i=3D2;i<x;i++)
if(x%i=3D=3D0)
break;
if(i=3D=3D(x-1))
return('P');
else
return('N'); =20
}=20
=20
The code should compile ok provided the changes above.
=20
=20
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>=20
* Alternative URL: http://run.to/noicys
=20
|