Monthly Archives: August 2013

C005 An interactive C program to generate the divisors of a given integer

Divisors are the numbers which can divide the number given and are less than the given number. Let’s identify variables needed for this program. First variable will be the one which will save the value entered by the user and it will be NUM. Other variable will be i which will be for FOR Loop.… Read More »

C004 An interactive C program that reads in integers until a zero is entered and display total of odd and even numbers and average of odd and even numbers

Let’s identify variables needed for this program. First variable will be the one which will save the value entered by the user and it will be NUM. Other variables will be according to the output requirements that are Total of even numbers (TOTAL_EVEN), Total of odd numbers (TOTAL_ODD), Average of even numbers (AVG_EVEN), Average of… Read More »

C003 An interactive C program to calculate INCOME TAX

First we need to know the INCOME TAX SLAB 2013 or whichever you prefer before calculating INCOME TAX for the person. The INCOME TAX SLAB 2013 is as follows:- First     Rupees         2, 00,000/- of income      :    0% tax Next     Rupees         5, 00,000/- of income      :    10% tax Next     Rupees   … Read More »

C002 An interactive C program to calculate Compound interest knowing only Simple interest

First thing to know before writing this program is the Simple interest Formula. SIMPLE INTEREST = (P * N * R)/100 P = PRINCIPAL AMOUNT. N = NUMBER OF YEARS (TIME). R = RATE OF INTEREST. Now, find out the variables needed for calculating Simple interest. SI = (P * N * R)/100 By looking… Read More »

An interactive C program to calculate Compound interest with formula

First thing to know before writing this program is the Simple interest Formula. COMPOUND INTEREST = (P *(1+R) N) P = PRINCIPAL AMOUNT. N = NUMBER OF YEARS (TIME). R = RATE OF INTEREST. Here the problem is the rate of interest should be in the form of 0.10 instead of 10%. Now, find out the variables… Read More »

C001 5 things you should know before you start learning C programming

1. Keywords Keywords are reserved words which are found in Data Types,Control Statements and Function names. Auto break case char const continue Default do double else enum extern Float for goto if int long Register return short signed sizeof static Struct switch typedef union unsigned void Volatile while   All keywords are in Lower case.… Read More »