Final_lab_manual
Final_lab_manual
DEPARTMENT OF
Bachelor of Computer Application(BCA)
LAB MANUAL
Programming for Problem Solving
NAME :
UNIVERSITY ROLL NO :
NAME OF LABORATORY : Programming for Problem Solving
CODE : BCAC192
INDEX
Assignment Date of Title of Page No. Remarks Teacher’s
No./Expt. No. Performance Assignment/Expt. Signature
Future Institute of Technology
Department of BCA
2. Write a Program in C to Make a Simple Calculator (Taking two Inputs & calculate
their Addition, Subtraction. Multiplication, Division).
3. Write a C program to find out the Area of a Rectangle.
5. Write a c program to calculate the simple interest where principle amount, rate of
interest and time period is given.
6. Write a C program to convert temperature from Fahrenheit to Celsius.
If-Else (ASSIGNMENT II ) :
9. Write a Program in C to enter marks of five subjects. Find the Sum and the Average
of them and then assign grade to the students according to the rule below
AVG GRADE
>=90% to <=100% O
>=80% to <=89% E
>=70% to <=79% A
>=60% to <=69% B
>=50% to <=59% C
>=40% to <=49% D
>40% FAIL
(a) ** (b) * * * *
(a) (b) * * * *
** ** * * *
* * *
** ** ** * *
* *
** ** ** ** *
*
(c) 1 (d) 1
2 2 2 3
3 3 3 4 5 6
4 4 4 4 7 8 9 10
19. Write a Program in C to find the sum of all the Prime numbers between a given
range of numbers.
20. Write a Program in C to find the GCD & LCM of two given numbers
21. Write a Program in C to find the sum of all the Even and Odd numbers between 1
and 100.
22. Write a Program in C o find & Print the Sum of all the Numbers Divisible by 7 within
a given Range.
23. Write a C program for determining whether a number is a Perfect number or not.
(e.g. 28 is a Perfect Number because Sum of the Divisor of 28 = 1+2+4+7+14
=28.)
24. Write a C program for determining how many Perfect numbers exist within a given
range.
25. Write a C program for determining whether a number is an Armstrong number or
not.
(e.g. 153 is an Armstrong number because 13 + 53 + 33 = 153.)
26. Write a C program for determining whether a number is a Pearson number or not.
(e.g. 145 is a Pearson number because 1! + 4! + 5! =145.)
27. Write a C program for determining how many Pearson numbers exist within a given
range.
Switch-Case (ASSIGNMENT IV ) :
28. Write a Program in C to create a menu driven calculator using switch case. The menu
should look like:
Menu Driven Calculator
a. Addition
b. Subtraction
c. Multiplication
d. Division
e. Modulus
Enter your Choice:
Future Institute of Technology
Department of BCA
29. Write a Program in C to calculate the area of a Triangle, Rectangle or a Circle using a
menu driven programming such that:
1. Triangle
2. Rectangle
3. Circle
4. Exit
1D Array (ASSIGNMENT ):
41. Write a Program in C to find the Factorial of a given number using function.
42. Write a Program in C to find the GCD & LCM of two given numbers using function.
43. Write a Program in C to find the sum of the series: (Calculate the factorials using
function)
(a) S=1 + 2 + 3 + 4 + 5 + . . .
(c) S= 1! + 2! + 3! + 4! + . . .
48. Write a Program in C to enter student details: roll, name, marks1, marks2, marks3,
total and sort by total. Also print the details of the student with highest total marks.
Use structure.
49. Write a Program in C to enter student details: roll, name, marks1, marks2, marks3,
total and sort by total. Also print the details of the student with highest total marks.
Use Union.
Future Institute of Technology
Department of BCA
NAME: …………………………………………………………………………………………………………………
DEPARTMENT: …………………………………………………………………………………………………………………
TITLE: ………………………………………………………………………………………………………………..
………………………………………………………………………………………………………………..
………………………………………………………………………………………………………………..
OBJECTIVE: …………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………
CO-WORKERS:
1 ………………………………………..
MARKS/GRADE: …………………………………