PRACTICAL
FILE
SOMANSH RASTOGI
CLASS XI-A
COMPUTER SCIENCE 083
]\
1. To find the number of years, days and weeks in a given number of days.
Output:
1
]\
2. To calculate HCF(GCD) and LCM of two numbers
Output:
2
]\
3) To write menu driven program for calculating area of different shapes
R : Rectangle, S:Square, C:Circle,T:triangle
3
]\
4. To print a multiplication table for a number.
Output:
4
]\
5. To find greatest of three numbers using nested if
Output:
5
]\
6.Factorial of a number
Output:
6
]\
7. To print Fibonacci series up to N terms.
Output:
7
]\
8. To find the sum of digits of a number using While.
Output:
8
]\
9. To see if given number is prime or not
Output:
9
]\
10.To print the following pattern:
1)
2)
3)
10
]\
11
]\
11. To display all prime numbers from N to M.
Output:
12
]\
12.Write a program to find the longest common substring in two given strings.
Output:
13
]\
13. Write a program to find the longest repeating subsequence in a string that repeats a
given value K times. E.g: Input: str1 = “abaabacdcd”, K = 2 Output: “aba”
Output:
14
]\
15