Thursday, November 10, 2011
Float dan Format Pecahan Desimal
#include <stdio.h>
#include <stdlib.h>
int main()
{
float fx = 3.5;
float fy = 0.0008;
float fz = 0.00008;
float fa = 812345;
float fb = 8123456;
printf ("fx = %f\n",fx);
printf ("fx = %.2f\n",fx);
printf ("fx = %10.2f\n",fx);
printf ("fx = %-10.2f\n",fx);
printf ("fx = %+10.2f\n",fx);
printf ("fx = %g\n",fx);
printf ("fx = %g\n",fy);printf ("fz = %g\n",fz);
printf ("fx = %g\n",fa);printf ("fb = %g\n",fb);
printf ("fx = %e\n",fx);
system ("PAUSE");
return (0);
}
Labels:
Tugas Dev.C++
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Silahkan Download Materi KKI UB Kampus (4) Kediri di Link Bawah ini. Download : Materi KKI.
-
#include <stdio.h> #include <stdlib.h> int main () { //Deklarasi Variabel int UTS,UAS,TUGAS; float NA; char grade; ...
-
#include <stdio.h> #include <stdlib.h> int main() { int i = 1; int x = 5; int y = x + i; printf ("i=%d\nx=...





No comments:
Post a Comment
Please...Follow my Blog and Leave your Comments!!!
Thank You...