Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
257 B

#include <stdio.h>
int main (void) {
float a;
printf("Enter a floating-point value: ");
scanf("%f", &a);
printf("fixed-point notation: %.2f\n", a);
printf("exponential notation: %.2e\n", a);
printf("p notation: %.2a\n", a);
return 0;
}