- Joined
- Oct 16, 2007
- Messages
- 1,886
- Reaction score
- 11
- Points
- 0
- Location
- USA-WA
- Website
- www.orbiter-forum.com
using
in c im getting weird things happening like;
*note: I didnot build this to see if it actually works so just get the jist of it for now, :lol:
for something like the example above, it will return some wierd number like 42,554,654,860:blink:
But when I use int instead of double then it comes out allright, :huh:
Problem with compiler???
Code:
double
Code:
double sum(double x, double y);
void run()
{
double x,y;
x = 5;
y = 3;
printf("The sum of 5 and 3 is %d\n",sum(x,y);
}
double sum(double x, double y)
{
return x+y;
}
for something like the example above, it will return some wierd number like 42,554,654,860:blink:
But when I use int instead of double then it comes out allright, :huh:
Problem with compiler???