I'm a newbie and just starting to learn C
I tried to use scanf for the first time:
I enter => rate= .04Code:#include <stdio.h> #include <stdlib.h> int main() { double rate; printf("how high is the rate : "); scanf("%f", &rate); printf("rate is %f\n", rate); return 0; }
I got => rate is -9255596313 etc.... instead of 0.04
What is wrong? FYI I'm using Visual C++ 2008 as compiler and the name of the program ends with .c