C New Assignment List (Basic + Advance)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Subject : C Programming

Assignment List

-----------------------------------------------------------------------------------------

1 Implement a program to calculate area of circle.

2 Implement a program for arithmetic operations like addition,


substraction, division and modulus.

3 Implement a program to calculate sum and avg of 5 no's.

4 Implement a a program to check whether the given number is even or


odd.

5 Implement a a program to check whether the given number is


positive or negative.

6 Write a program which accept temperature in Fahrenheit and print it in


centigrade.

7 Write a program that takes length as input in feet and inches. The
program should then convert the lengths in centimeters and display it
on screen. Assume that the given lengths in feet and inches are
integers.

8 Calculate simple interest formula si = Principal amount * rate *


Period /100
9 Implement a program to check whether given number is prime or not .

10 Implement a program for factorial.

11 Implement a program for Fibonacci series.

12 Write a program to print out all Armstrong numbers between 1 and


500. If sum of cubes of each digit of the number is equal to the
number itself, then the number is called an Armstrong number.
For example, 153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 ) + ( 3 * 3 * 3 )

13 Write a program which display a number between 10 to 100 randomly.

14 Write a program that lets the user perform arithmetic operations on


two numbers. Allowing the user to select the operation (+, -, *, or /)

15 Write a program to swap first and last element of an integer 1-d array.
And display in edit text control.

16 Accept six subject Marks from user.

1 And also find the grade of the student

2 if Student is fail in 2 subject then result is A.T.K.T.

3 if student is fail in More than 2 subject than Fail

5 Grading is based on Avg Marks

Avg >=75 and avg <100 Dist

Avg >=60 and avg <75 First

Avg >=50 and avg<60 Second


Avg>=35 and avg<50 Pass

Below 35 fail

17 Compound Interest Formula

P = principal amount (the initial amount you borrow or deposit)


r = annual rate of interest (as a decimal)
t = number of years the amount is deposited or borrowed for.
A = amount of money accumulated after n years, including interest.
n = number of times the interest is compounded per year

E.g An amount of 1,500.00 is deposited in a bank paying an


annual interest rate of 4.3%,compounded quarterly. What is the
balance after 6 years

Using the compound interest formula, we have that


P = 1500, r = 4.3/100 = 0.043, n = 4, t = 6. Therefore,

18 Accept the salary of an employee from the user. Calculate the gross
salary on the following

basis:

Basic HRA DA PF Tax

1 - 4000 10% 50% 15% 2%

4001 - 8000 20% 60% 10% 5%

8001 - 12000 25% 70% 10% 8%

12000 and above 30% 80% 15% 10%

Formula Grass salary = (Basic+hra+da)-(pf+tax)

19 A company insures its drivers in the following cases:

1. -if the driver is married .


2. -if the driver is unmarried,male and above 30 years of age.

3. -if the driver is unmarried,female and above 25 years of age.

4. In all other cases the driver is not insured. If the martial status,sex
and age of the driver are the inputs,write a program to determine
whether the driver is to be insured or not,

5. We can write a program for the above problem in two ways:

20 Any character is entered through the keyboard, write a program to


determine whether the character is a capital letter, a small case letter,a
digit or a special symbol.

1. The following table shows the range of ascii values for various
characters

1.i. Characters Ascii values

1.ii. A-Z 65-90

1.iii. a-z 97-122

1.iv. 0-9 48-57

1.v. Special symbols 0-47, 58-64, 91-96, 123-127

21 An Insurance company follows following rules to calculate premium.

1. If a person’s health is excellent and the person is between 25 and


35 years of age and lives in a city and is a male then the premium
is Rs. 4 per thousand and his policy amount cannot exceed Rs. 2
lakhs.

2. If a person satisfies all the above conditions except that the sex is
female then the premium is Rs.3 per thousand and her policy
amount cannot exceed Rs 1 lakh.
3. If a person’s health is poor and the person is between 25 and 35
years of age and lives in a village and is male then the premium is
Rs.6 per thousand and his policy cannot exceed Rs.10,000.

4. In all other cases the person is not insured.

5. Write a program to output whether the persons should be insured


or not, his/her premium rate and maximum amount for which
he/she can be insured.

22 A certain grade of steel is graded according to the following conditions:

1. (i)Hardness must be greater than 50

2. (ii)Carbon content must be less than 0.7.

3. (iii)Tensile strength must be greater than 5600.

4. The grade are as follows:

5. Grade is 10 if all three conditions are meet

6. Grade is 9 if conditions (i) and(ii) are met.

7. Grade is 8 if conditions (ii) and(iii) are met.

8. Grade is 7 if conditions (i)and (iii) are met

9. Grade is 6 if only one condition is met

10. Grade is 5 if none of the condition are met

11. Write a program which will require the user to give values of
hardness, carbon content and tensile strength of the steel under
consideration and output the grade of the steel.

23 Write a program which accepts amount as integer and display total

number of Notes of Rs. 500, 100, 50, 20, 10, 5, 2, and 1.


For example, when user enter a number, 575,
the results would be like this...
500: 1
100: 0
50: 1
20: 1
10: 0
5: 1
1: 0

24 Write a program to calculate the monthly telephone bills as per the


following rule:
Minimum Rs. 200 for upto 100 calls.
Plus Rs. 0.60 per call for next 50 calls.
Plus Rs. 0.50 per call for next 50 calls.
Plus Rs. 0.40 per call for any call beyond 200 calls.

25 Write a program to do following operation on two dimensional array A


and B.

Ask user for addition or Multiplication and then show

 Sum of all elements of matrix (Addition of matrix)


 Multiplication of Matrix

26 Create an array for name and age

 In form we require ADD, First, Next, Previous, Last buttons


 Only five record is added into the array after that show toast
message that array is full.
 Now if you click on first button it must show first element in the
array
 if you click on last button it must show last element in the array
 if you click on previous button it must show previous element in
the array
 if you click on next button it must show next element in the
array
 all the error must be handle and toast message will be shown to
user

27 Create a calculator
28 Do the Program for Swapping of two numbers

29 Make a Notification Example.

You might also like