I hope you are kidding (wambozi) do you know what is scanf function?
I think you don't, but you will learn some day I hope.
Here is your answer vincentaries, you are declaring "a" as int, but you are using: scanf("% "d" \n", &a); %d this is four double not for int so try this: scanf("%lf\n", &a); this shoud resolve you'r problem;)
PD. you can use the %lf and save it in double variable but not vise-verse.
|