71.8k views
2 votes
What is this line of code doing? scanf("%f", &height);

1 Answer

2 votes
It's saving a float value in your variable "height".

for example:

float height = 0.0;

printf("Insert your height: ");
scanf("%f", &height);
User Priebe
by
8.3k points