Please help me with this code. when i tried to run it, it doesn't continue to this part
"printf("\n\n Money: ");" but when i tried to change the data type of money to integer it does continue, but i need a float data type. please help, thank you.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
FILE *rec;
rec= fopen("rec_log.txt", "w");
struct reco
{
char acc[6];
char pin[5];
int money;
}log[3];
for(int i=1;i<4;i++)
{
printf("\n\n Enter Account: ");
scanf("%s",log[i].acc);
fprintf(rec,"\n\n Account no.%d : %s",i, log[i].acc);
printf("\n\n Enter Pin: ");
scanf("%s",log[i].pin);
fprintf(rec,"\n\n Pin no.%d : %s",i, log[i].pin);
printf("\n\n Money: ");
scanf("%f",log[i].money);
fprintf(rec,"\n\n Money: %f",log[i].money);
}
fclose(rec);
getch();
}//main