Saturday, March 12, 2011
Thursday, March 10, 2011
Saturday, March 5, 2011
5
Saturday, March 5, 2011
RJ
read more
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.
Thursday, March 3, 2011
2
Thursday, March 3, 2011
RJ
read more
C Program Language (Functions: Square Root And Power)
The problem is the program must ask the user what function should be used either Square, Square Root or Power which usually known as exponential function. Then after the tree choices the program will ask the user to input given or data to solve it is like a menu where you can select what you want and suited in your needs. At the same time after each solution the program will ask the user to repeat the problem or terminate it. These program will be using functions to easily answer the problems and still be using the math.h and stdlib.h header. Take a look to the outputs below.
Solving the Square of a number
Solving the Square Root of a number
Solving the Power of a number
Now see the codes on how to get the output above.
Wednesday, March 2, 2011
1
Wednesday, March 2, 2011
RJ
read more
C Program Language (Area Of Circle, Triangle and Square)
These program will be tackling about the area of a circle, triangle and square. We all know that to get the area of those shapes we must identify first the formulas to used. Now here are the formulas
Circle
Area = πr2
Circumference=2πr
r = radius
Triangle
Area = ½b × h
b = base
h = vertical height
Square
Area = a2
a = length of side
After getting the formulas we have to use it in the program. The program will ask the user what area should find either circle, triangle or square. Then the program will ask the user the given and the program will show the answers. The program also will ask the user to repeat again or terminate the program. The output will be shown below.
Circle
Area = πr2
Circumference=2πr
r = radius
Triangle
Area = ½b × h
b = base
h = vertical height
Square
Area = a2
a = length of side
After getting the formulas we have to use it in the program. The program will ask the user what area should find either circle, triangle or square. Then the program will ask the user the given and the program will show the answers. The program also will ask the user to repeat again or terminate the program. The output will be shown below.
Getting the area of Circle
Getting the area of Triangle
Getting the area of Square
Subscribe to:
Posts (Atom)