Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Where is the simple error? (http://www.go4expert.com/forums/simple-error-t7729/)

cquestion 6Dec2007 04:45

Where is the simple error?
 
Hello, i'm going mad because I can't find the problem in this simple code. Why do this don't work?
Code:

float promedi(a,b)
{
return ((a+b)/2);
}

main()
{
float x,y;
printf("Dame dos valores\n");
scanf("%f%f", &x, &y);
printf("%f",promedi(x,y));
system("pause");
}

I got at least two different errors (strange long number solutions, window must close...).

Thanks in advance.

cquestion 6Dec2007 05:30

Re: Where is the simple error?
 
When it says 'Dame dos valores' it means tell me two numbers.

shabbir 6Dec2007 09:44

Re: Where is the simple error?
 
Duplicate of Where is the simple error?. Thread closed.


All times are GMT +5.5. The time now is 18:13.