Labppaper
Labppaper
Test Data :
Input x1: 25 Input y1: 15 Input x2: 35 Input y2: 10
Expected Output: Distance between the said points: 11.1803
b) Write a C program to read an amount (integer value) and break the amount into the smallest possible number
of bank notes.
Test Data :
Input the amount: 375
Expected Output: There are: 3 Note(s) of 100.00 1 Note(s) of 50.00 1 Note(s) of 20.00 0 Note(s) of 10.00
1 Note(s) of 5.00 0 Note(s) of 2.00 0 Note(s) of 1.00
Note: The possible banknotes are 100, 50, 20, 10, 5, 2 and 1.
2a).Write a Program to find largest number in given three numbers using conditional operator.
b) Write a Program to print Compound interest
3a). write a program to find the area of a triangle using heron's formula
b). Write a Program to find the sum of digits of a given 4 digit number
4.a)Write a C program to print a block C using the hash (#), where the C has a height of six characters and width
of five and four characters.
######
## ##
#
#
#
#
#
## ##
######
b).Write a C program to compute the perimeter and area of a circle with a given radius.
Expected Output: Perimeter of the Circle = 37.680000 inches Area of the Circle = 113.040001 square inches
5.a)Write a Program to find largest number in given three numbers using conditional operator.
b). Write a Program to print Compound interest
9. Write a C program to display a pattern like a right angle triangle with a number.
The pattern like :
1
12
123
1234
10.. Write a program in C to display the n terms of a harmonic series and their sum.
1 + 1/2 + 1/3 + 1/4 + 1/5 ... 1/n terms
11. Write a program in C to find the sum of the series [ x - x^3 + x^5 + ......].
12. Write a C program to check whether a given number is an Armstrong number or not using do while loop
13. Write a C program to determine whether a given number is prime or not using while oop
14. Write a program in C to display the first n terms of the Fibonacci series using for loop
20.Write a C program to add two strings and print the resultant string in reverse order.
21. Write a program in C to copy the elements of one array into another array.
23Write a program in C to merge two arrays of the same size
24. Write a program in C for adding two matrices of the same size.
27.reate a structure named "Employee" to store employee details such as employee ID, name, and salary. Write a
program to input data for10 employees using array .Ffind the highest salary employee, and display their
information.
28.Create a structure called "Student" with members name, age, and total marks. Dob Write a C program using
nested structure read date for dob and input data for two students, display their information.
29 Design "Car" to store details like car ID, model, and rental rate per day named "Car" to store details like car ID,
model, and rental rate per day.Write a c program using unions read and display the information
30. Write a program in C to swap two numbers using 4 types of function calls
31. Write a C program to find the multiplication of two matrices using function
32. Write a c program to demonstrate how to pass and return a structure from function
34. Write a c program to find the factorial of a given number using recursion
35.Write a C program to demonstrate the passing the parameters using call by value and call by reference
36.Write a program in C to demonstrate the use of the &(address of) and *(value at address) operators.
37 Write a C program to demonstrate self referential structures
38. Write a program in C to store n elements in an array and print the elements using a pointer.