0% found this document useful (0 votes)
15 views9 pages

LAB SHEET of Grade Xi

Uploaded by

Tenukhang limbu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views9 pages

LAB SHEET of Grade Xi

Uploaded by

Tenukhang limbu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

LAB SHEET:- 1

1. WAP to print the “Hello world” on the screen.

2. WAP to print the name, address and roll no. on the screen. (Use different escape sequences to format the output on

the screen like: \n, \t).

3. WAP to find sum, difference, product and division (quotient & remainder) of two any numbers and display the results.

4. WAP to convert temperature given in Fahrenheit to Celsius. [C/100= (F-32)/180].

5. WAP to calculate the area of circle.(without taking input from the user)

6. WAP to input the radius of a circle, and calculate the area and circumference of the circle.

7. WAP to input the length & breadth of a rectangle, and calculate the area of the rectangle.

8. WAP to input principle amount, no. of years and rate of interest from user and calculate the simple

interest.[SI=PNR/100]

9. WAP to input the temperature from the user and convert temperature given in Fahrenheit to Celsius. [C/100=

(F- 32)/180].

10. WAP to input the values of a & b and calculate the cube of (a + b).

11. WAP to input the radius and height of the cylinder and find the total surface area.[S=2 * PI * r * (r + h)]

12. WAP to read three sides of a triangle. Calculate the

area. [Hint: ∆2= s(s-a) (s-b) (s-c), 2s= (a + b + c)]

13. Find the square root of a number given by user.

[Hint: Use function sqrt (variable name) and #include<math.h>]

b
14. WAP to read and b. Calculate (a ), a to the power b.

[Hint: Use function pow(variable name, power), and #include<math.h>]

15. WAP to calculate compound interest for the given principle, no. of years and rate of interest.[Hint:

n
C=P[(1 + r/100) -1] ]
16. WAP to exchange two numbers.

17. WAP to calculate: [A] (a + b) / (c + d) [B] √(a b) / ( c + d ) [C]


( (a-b) /(c*c*d) )
5 [D] ( ( a + b ) / c ) / ( a-( b / d ) )
18. A computer manufacturing company has the following monthly compensation policy to their sales
person: Minimum base salary=1500.00

Bonus for every computer sold=200.00

Commission on the total monthly

sales=2%

Since the prices of computers are changing, the sales price of each computer is fixed at the beginning

of every month.

Given the base salary, bonus and commission rate, the inputs necessary to calculate the gross salary are, the price

of each computer and the number sold during the month.

The gross salary is given by the equation:

Gross salary = Base salary + (quantity * bonus rate) + (quantity * price) * commission rate.

19. In inventory management, the economic order quantity for a single item is given

by: EOQ =√ (2* demand rate * setup costs)/ (holding cost per item per unit

time) And the optional time between orders is given by:

TBO = √ (2 * setup costs)/ (demand rate * holding cost per item per unit time)

WAP to compute EOQ and TBO, given demand rate, setup costs and the holding cost.

20. The straight- line method of computing the yearly depreciation of the value of an item is given by: Depreciation

= (Purchase price-salvage value) / Years of service.

21. Solve the quadratic equation A x 2+ b x + c=0. [Assume all roots are real only]

LABSHEET:2

1. WAP to read a 3 digit no. and print each digit separately.

2. WAP to read four digit no. & print the sum of each digit.

3. WAP to read 3 digit no. & find sum of square of digits.

4. WAP to read 3 digit no. & find if it is palindrome or not. Hint: use ternary operator.

5. WAP to read no. of days & print in terms of year, months & days.

6. WAP to read total no. of seconds and print it in hours, minutes and second.

7. WAP to read a no. & find out if it is Armstrong no. or not. Hint: N=a3+b3+c3

8. WAP to input two points A(x1,y1) & B(x2,y2) and find the distance between them. Hint: AB= sqrt [ (x1-x2) 2 -

(y1- y2)2 ] .

9. WAP to input the coefficient of simultaneous equation and find the values of x, y.
a1x+b1y+c1=0, a2x+b2y+c2=0 ,

x=(b2*c1-b1*c2)/(b2*a1-a2*b1) and y=(c2*a1-c1*a2)/(b2*a1-a2*b1).

10. WAP to read a no. and find if the no. is even or odd.

11. WAP to read 3 no. and display the greatest no. (use ternary operator).

12. WAP to read 2 no.s , if the first no. is greater than second no. ,display the sum else display the product of two
no.s (use ternary operator).

13. WAP to input four no.s and display the greatest no.

14. WAP to prnt the absolute value of a no. input by the user.

15. WAP to find if the given no. is positive or negative (use ternary operator).

LAB SHEET:- 3

1. WAP that identifies whether the given number is odd or even.

2. WAP that takes three numbers and prints the largest number.

3. Solve the quadratic equation: Ax2+Bx+C. (print imaginary roots also)

4. WAP to print the day depending upon the number inputted by the user.

5. WAP that asks the user to enter his/her marks of subjects and prints the corresponding grade.

Grade Table: >=80: A, >=60: B, >=50: C, >=40: D, <40: F.

6. WAP that reads a year from user and find if the year is a leap year. (Year%4)

7. WAP to calculate sum, difference, multiple, division of two numbers. (Use if else statement)

8. WAP to print day depending on the number input by user. (Use switch case)

9. A program should be able to calculate sum, difference, product, division of two numbers. Your program

should display the list of options from which user selects one of them. (Use switch case)

a. Add b. Subtract c. Product d. Division

Enter your choice: 2

10. WAP to read three sides of triangle and check the validity of triangle, also decide the type of

triangle. (Isosceles, equilateral, right angle) [If a, b, c are sides of a triangle then, a+b>c or b+c>a or

a+c>b ]

11. WAP that read one character and convert it into upper character case, if it is in lower case and vice versa.

(ASCII code for A=65, Z=90, a=97, z=122)

12. WAP to read a character and check if it is a digit, alphabet or special character.

13. WAP to read five numbers and find the largest number.

14. WAP to read three numbers and print the middle number.
15. WAP to read Annual Salary of an employee and decide tax withheld as follows:

Salary tax

Up to 100000 0%
Up to 150000 15%
Above 150000 25%
LAB SHEET:-4 (Looping)

1. WAP that prints the numbers from 201 to 300(use while loop, do while loop, for loop).

2. WAP that finds the sum of odd numbers from 0 to 100.(use do- while

loop) i.e. sum=1+3+….+99

3. WAP which display the average & sum of nth no input by the user.

4. WAP to read a number and display the multiplication table of that number.

5. WAP that reads two numbers x and y from user and calculates the value of x to the power y. (while loop,

for loop)

6. WAP that reads a number (n) from user and calculates the factorial of that number.(using while, for)

7. WAP that checks whether the given number(x) is prime or not.[Hint: prime no. is that number which is

NOT divisible by numbers other than 1 and itself. (Using while, for)

8. WAP to solve the quadratic equation.

9. WAP to input the number and find the sum of each digits of number.

10. WAP to read number and find whether the given number is Armstrong or not.

11. WAP to read a number and find whether the given number is palindrome or not.

12. WAP to find the leap year between 1900 and 2000.

13. WAP to accept any number „n‟ and print the cube of all numbers from 1 to n which is

exactly divisible by 3.

14.WAP to find all the prime numbers between 1 to 100.

15.WAP to find all the Armstrong number between 100 to

500.

16. WAP to read the age of 20 persons and count the number of persons in the age group 50 to

60. 17.WAP to generate the Fibonacci series.[0 1 1 2 3 5 8…...........]

18. WAP that generates the multiplication as shown below. [Use nested looping] (Using while, for)

1 2 3 4 5 6 7 8 9 10

2 4 6 7 8 10 14 16 18 20

…………………………………
…………………………………

10 20 30 40 50 60 70 80 90 100

19. WAP to generate the following output

a) b)

1 1

12 22

123 333

1234 4444

12345 55555

c) d)

1 *****

10 ****

101 ***

1010 **

e)

**

***

****
20. WAP to find the result of following series.

 Sum = 11 + 22 + 33 + 44 + …………..till „n‟ terms

 Sum = 1/x + 2/x2 + 3/x3 + 4/x4.......till “n” terms

 Sum = 1/x + 2/x3 + 3/x5 + 4/x7.......till “n” terms

 Sum = 1/2 + 3/4 + 5/6 +7/8 +.......till “n” terms


LAB SHEET:-5 (array)

1.WAP to enter values in array called myarray of size 15 and display the elements of

array. 2.WAP to sum and average of all the elements of array.

3. WAP to add two arrays and put in third array.

4. WAP to find largest and smallest element in an

array. 5.WAP to print Fibonacci series.

6. WAP to separate odd and even elements of array.

7. WAP that initialize ten numbers and search the key (a number given by the user)from the list .If the key is

found then it displays the index(subscript of an array)otherwise it displays the proper message

i.e. "key is not found".

8. WAP to sort the given list of numbers.

9. WAP that reads two matrices of size N*N and prints the sum and difference of those

matrices. 10.WAP that reads two matrices of size N*N and prints the product of those matrices.
11.WAP that reads a matrix and identify if the given matrix is symmetric or not.
(array contd with functions)

1. WAP to read arry of 10 no.s and display it using array and

function. 2.WAP to read array of 5 no.s and display:

(a) the largest no. using function and array.

(b) the smallest no. using function and array.

3.WAP to read two arrays, add two array and store the result in third array and print it using function.

4.WAP to read an array and sort it in ascending order.

5.WAP to read age of 'n' students and display the second lowest age.
(array contd. with 2d and 3d matrix)

1. WAP to input a 2d matrix and print it.

2. WAP to input two 2d matrix, add, subtract and print


it. 3.WAP to input two 2d matrix, multiply and print it.

4. WAP to find transpose of 2d matrix.

5. WAP to input a 3d matrix and print it


Labsheet-6(string)

1.WAP that accepts a line from user & prints it in upper case.(use gets to read line) 2.WAP to check if two string are equal or not.(do not use

strcmp)

3.WAP to read a string & find out the length of string.(do not use strlen) 4.WAP to input a string & reverse the string.

5. WAP to read a line of text & count the no. of words & characters in the line.

6. WAP to read a line of text & count the no. of digits,uppercase & lowercase characters in the line. 7.WAP that reads a string & checks if it is a palindrome.

8. WAP to sort an array of string.

9. WAP to read a line of text & print each character of the text in reverse case. i.e. print lowercase if it is in uppercase & viceversa.

1.WAP to read a string & find the length using strlen(). 2.WAP to check if two string are equsl or not.

3.WAP to read 2 strings, join it and display it using strcat(). 4.WAP to read name of 10 persons,sort it & display it.

5. WAP to read a line of text & print each character,print in reverse case (use toupper() & tolower(),<ctype.h>).

You might also like