#include <stdio.h>
int main()
{
float f = 1.123456789;
char c[50]; //size of the number
sprintf(c, "%g", f);
printf(c);
printf("
");
}
#include <stdio.h>
int main()
{
float f = 1000;
char c[50]; //size of the number
sprintf(c, "%g", f);
printf(c);
printf("
");
}
Code Example |
---|
:: |
:: bootstrap form |
:: |
:: |
:: |
C :: |
:: |
:: bubble sort |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
C :: |
:: |
:: |
:: C How to define a union? |
C :: |
:: |
:: |
:: |
C :: |
:: |
C :: |
:: |
:: |
:: |
C :: |