Saturday, March 5, 2011
5
C Program Language (Converting Fraction to Decimal)
For all the post I had created I think this is the most simple yet very interesting. Few words only are being used in this program but gives a very helpful thing to the new programmers and fun coding mathematical problems. This program converting fractions to decimal gives us new idea how to program new topics, these program also improve our skills and help us understand more the c programming language. Take a look on the output shown below.
The output above allows the user to input fractions and the program will automatically show the result. These may be a very less scope for a programmer like me but it helps me a lot. Because converting fractions to degree gives an output which the user can easily understand. Now observe the codes that were being used.
#include<stdio.h> #include<conio.h> main() { float n1,n2; char letter; float convert; printf("Enter Fractions: "); scanf("%d%c%d",&n1,&letter,&n2); convert = n1/n2; printf("\nThe value into decimal is %.1f",convert); getch(); }
Subscribe to:
Post Comments (Atom)
5 Responses to “C Program Language (Converting Fraction to Decimal)”
March 29, 2012 at 10:57 AM
It is very good.................
November 10, 2012 at 12:34 PM
I am using an online converter like http://decimal2fraction.com to convert decimals to fractions. It saves me a lot of time. Hope you like it. :)
August 28, 2020 at 3:34 AM
I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy. I think it may be help all of you. Thanks.
how to pray the rosary
February 18, 2021 at 3:38 AM
Thank you. buy YouTube Views
April 29, 2021 at 1:22 PM
Great job for publishing such a beneficial website. buy organic Instagram followers
Post a Comment