Hi I am new to c programming and I am having trouble getting the decimal number in the text file using the fscanf. It always give me 2 numbers instead of one
Example: in the text file there is: 2.5

but in the result it game me 1 char type(2.) and 1 integer type(5);

how can I get the decimal number as int?

```
while((val = fscanf(stdin,"%d%c",&num ,&c)))

```