#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 |
---|
C :: reverse list in C |
C :: what is covert channel |
C :: c/c++ type format |
C :: selection sort in c |
C :: c argv |
C :: puts without newline c |
C :: how to checkout branch from commit id |
C :: union in c |
C :: how to sort assending in c |
C :: install gnome tweaks ubuntu 20.04 |
C :: goto statement in c |
C :: slug urls django |
C :: toupper function in c |
C :: ruby find object in array by attribute |
C :: celsius to fahrenheit formula |
C :: mpi example |
C :: c check first character of string |
C :: Bootstrap textarea from |
C :: unable to locate package dos2unix |
C :: add to beginning of array c |
C :: actionbar content color in android |
C :: pid of a process in c |
C :: mysql yyyymm format |
C :: boolean input in c |
C :: getline function in c |
C :: script in c |
C :: c programming programiz |
C :: How to send an array through a pipe |
C :: sOY wapo ya lo c |
C :: run steam as root |