List of programs for class XI
Note: Each program should be properly indented. Each program should be properly documented with programmer name, date of program, and a brief detail of the program using comments wherever necessary. 1. WAP to input the values of Principal, Rate, and Time and calculate SI and CI. 2. WAP which will raise any number x to a positive power n. Obtain values of x and n from the user. 3. WAP to input a number. If the number is even, print its square, otherwise print its cube. 4. WAP to find the roots of a quadratic equation. 5. WAP to input choice (1 or 2). If the choice is 1, print the area of a circle otherwise print the perimeter of a circle. Accept the radius of the circle from the user. 6. WAP that reads in a character <ch> from the keyboard and then displays one of the following messages: a. If <ch> is a lower case alphabet, the message The upper case character corresponding to <ch> is b. If <ch> is an upper case alphabet, the message The lower case character corresponding to <ch> is c. If <ch> is not an alphabet, the message <ch> is not an alphabet 7. Write a menu driven program to calculate the total surface area and volume of a cube, cuboid, or sphere depending upon users choice. The program should continue until the user selects the option to exit the program. 8. WAP to input a number. If the number is negative, then again input the number. Keep on doing so until the user enters a positive number. 9. WAP to input two numbers m and n. Then display first m multiples of n. 10. WAP to input 10 numbers and then display their sum and average. Also display the largest and the smallest of the numbers entered. 11. WAP to input two numbers and find their LCM and HCF. 12. Write a program to input a number and check whether it is a prime or not. 13. WAP to input a number and check whether it is palindrome or not. 14. WAP to find the sum of first n terms of the following series: 1- x +
x2 x3 +... 2! 3!
15. WAP to find the sum of first n terms of the following series: 1+
x3 x5 x7 + + ... 3! 5! 7! x3 x5 x7 + ... 3! 5! 7!
#1/2
16. WAP to find the sum of first n terms of the following series: 1-
17. WAP to generate n lines of the following pattern on the computer screen: 1 121 12321 1234321 . . 18. WAP to generate 2n+1 lines of the following pattern on the computer screen: * @@@ ***** @@@@@@@ ***** @@@ * 19. WAP to generate 2n+1 lines of the following pattern on the computer screen: * * * * * * * * * * * * 20. WAP to input a string and then display this string in reverse order. 21. WAP to input a string and check whether it is a palindrome or not. 22. WAP to input a string and find the presence of a given substring in it. 23. WAP to count the number of words in it. 24. WAP to input two strings and concatenate them into a third string. 25. WAP to input a list of numbers and then reverse this list of numbers without using a second array. E.g. if the original list contains 5,2,3,4,1,9, then after reversal the list should contain 9,1,4,3,2,5. 26. WAP to input the aggregate marks of n students of a class. Then reproduce this marks list in the descending order of marks. Along with marks the program should also display the grade of each student. The grades are calculated as follows: Marks >90 75 89 60 74 50 59 40 49 <40 Grade A B C D E F
27. WAP to input 10 numbers and then sort this list of numbers in ascending order. 28. WAP to input 10 numbers and then sort this list of numbers in ascending order or in descending order depending upon users choice. 29. WAP to input elements in two matrices and then find the sum of these matrices. 30. WAP to input a list of numbers in an array and then rearrange this array in such away that all the odd numbers appear in the beginning of the array and all the even numbers appear in the end of the array. E.g., if the input list is 1,4,2,7,6,5,9, then after rearrangement the list should be: 1,7,5,9,4,2,6.
#2/2