[go: up one dir, main page]

0% found this document useful (0 votes)
19 views16 pages

Practical File

The document outlines a series of programming tasks for a Computer Science class, including finding the number of years, days, and weeks in a given number of days, calculating HCF and LCM, and creating a menu-driven program for area calculations. It also includes tasks for generating multiplication tables, finding the greatest of three numbers, and printing Fibonacci series, among others. Each task is numbered and has a designated output section.

Uploaded by

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

Practical File

The document outlines a series of programming tasks for a Computer Science class, including finding the number of years, days, and weeks in a given number of days, calculating HCF and LCM, and creating a menu-driven program for area calculations. It also includes tasks for generating multiplication tables, finding the greatest of three numbers, and printing Fibonacci series, among others. Each task is numbered and has a designated output section.

Uploaded by

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

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

You might also like