please tell the work of %d and %f
i m little bit confused in functions of %d and %f bcz
code run properly when i tried in college in turbo compiler
vs
code run properly when i tried in home in vs code
difference in use of %f and %d in both code
//tried in home in vs code
#include<stdio.h>
#include<conio.h>
int main() {
int age , sum ;
printf("enter age") ;
scanf("%d" , &age ) ;
printf("age %d" , age ) ;
return 0 ;
}
//tried in clg in turbo
#include<stdio.h>
#include<conio.h>
int main() {
int age , sum ;
printf("enter age") ;
scanf("%f" , &age ) ;
printf("age %d" , age ) ;
return 0 ;
}```
please reply fast, i have 3 days holiday and want to complete c ASAP