Hi everyone,
I not very clear what you are talking about.
Receving decimal numbers???
Do you mean returning decimal numbers from a function
declare a variable as float
float a;
a = rew( ); // Is this what you mean
As for your other question
You cannot call a function within its own function.
You can declare the function externally being public or private
and call it
if there is arguments and a return value
a = gow(c,d); // Is this what you mean
if it has no arguments or any return values
gow(); //Is this what you mean
I really hope this helps you
Yours Sincerely
Richard West
freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
First, avoid scanf . Second, use a floating point type to enter a floating point value.
#include <stdio.h>
int main()
{
double number;
fputs("Enter number: ", stdout);
fflush(stdout);
if ( scanf("%lf", &number) == 1)
{
printf("number = %g\n", number);
}
return 0;
}
/* my output
Enter number: 23.45
number = 23.45
*/
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314