Tag Archives: interactive

A C Program to used as Weight Converter – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/13 Assignment 2013  An interactive C program called “WEIGHT CONVERTER” that accepts the weight in milligrams / decigrams / centigrams / kilograms /ounces / pounds / tons and displays its equivalent in grams.   #include<stdio.h> void main()… Read More »

A C Program to convert Binary to Octal number – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/13 Assignment 2013    An interactive C program to convert a binary number to its octal equivalent.   #include<stdio.h> void main() { char S[15]; int I,Y,LIMIT,LEN,OCT[15],BIN[15],RESULT,FLAG=0; clrscr(); printf(“ENTER BINARY NUMBER TO BE CONVERTED : \n”); scanf(“%s”,&S); LEN=strlen(S);… Read More »

C014 An interactive C program that will take as input a set of 20 integers and store them in an array and using a temporary array of equal length, reverse the order of the integers & display the values.

Let’s identify variables needed for this program. In this program, we need several variables to store and compare the values to find the largest and the smallest out of them. Its not recommended to take number of variables declared of the same data type with different names and remembering it. It becomes worst when the… Read More »

C009 An interactive C program to find the roots of a Quadratic equation

First thing to know before writing this program is the Quadratic Equation Formula. Here the problem is the this whole Quadratic Equation can not be written on single line. Now, find out the variables needed for calculating Roots of Quadratic Equation. X1 = (-B-Square Root(b 2 – 4AC))/2A    AND   X2 = (-B+Square Root(b 2 – 4AC))/2A… Read More »

C008 An interactive C program to check whether given two numbers are amicable numbers or not

Amicable numbers are two numbers so related that the sum of the proper divisors of the one is equal to the other, unity being considered as a proper divisor but not the number itself. Let’s identify variables needed for this program. First two variables will be the one which will save the values entered by… Read More »

C007 An interactive C program to check whether a given number is a perfect number or not

A positive number is called Perfect Number if it is equal to the sum of all of its positive divisors,  excluding number itself. 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. Second variable will be i… Read More »

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 »