Use scanf and printf to read and write float value in console
#include <stdio.h>
int main(void)
{
float a, b;
printf("Enter two numbers: ");
scanf("%f", &a);
scanf("%f", &b);
printf(" sum = %f.", a + b);
return 0;
}
Related examples in the same category