Home » , » Basic C Programming Practice - Practice 24

Basic C Programming Practice - Practice 24

Written By Unknown on Friday, October 11, 2013 | 12:04 AM

=> Write a program in C to read and print the given float with two decimal places?




Solution :

                     #include<stdio.h>
                     #include<conio.h> 

                       main()

                            {
                                  float a;

                                  printf("Please Enter Your Number : ");


                                  scanf("%f", &a);

                                  printf("%10.2f", a);

                                 getch();


                             }


Program Analysis :


Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Learn Programming - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger| Distributed by Rocking Templates