View previous topic :: View next topic |
Author |
Message |
lilayta
Joined: 26 Feb 2004 Posts: 3
|
programing problem |
Posted: Thu Feb 26, 2004 5:48 am |
|
|
Hello everybody,
I am using the pic 16f877A, and I�d like to make a program in C which divide two integers numbers , so that I can save the quotient and the remainder in two differents variables. I have wrote this code
div_t idiv;
idiv= div(num,den);
but when I compile with CCs always give me errors
Anyone can help me?
Thanks |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
Re: programing problem |
Posted: Thu Feb 26, 2004 7:43 am |
|
|
lilayta wrote: | Hello everybody,
I am using the pic 16f877A, and I�d like to make a program in C which divide two integers numbers , so that I can save the quotient and the remainder in two differents variables. I have wrote this code
div_t idiv;
idiv= div(num,den);
but when I compile with CCs always give me errors
Anyone can help me?
Thanks |
How about
int div_t;
int idiv;
idiv = num / den;
div_t = num % den; _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|