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
268 B

#include <stdio.h>
#include <string.h>
int main (void) {
float number;
printf("Give a float number: ");
scanf("%g", &number);
printf("The input is %.1f or %.1e\n", number, number);
printf("The input is %+.3f or %.3e\n", number, number);
return 0;
}