Top Banner

of 3

60877735-List-of-Programs-Class-XI-2011-12

Apr 06, 2018

Download

Documents

Niti Arora
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/3/2019 60877735-List-of-Programs-Class-XI-2011-12

    1/3

    Kulachi Hansraj Model School

    Computer Science (083)

    Program List

    Class XI (2011-12)

    Write programs in C++ for following using appropriate programming constructs

    1. Multiplication of a number x upto n terms2. Factorial of a given number n eg. 5! = 5 X 4X 3 X 2 X 1 and 0!=1

    3. Write a program to take input of two numbers and find weather they are co-prime or not.HINT : Co-prime are the numbers which do not have any common factor exceptfor 1. In other words two numbers having HCF=1 are co-prime.

    4. Write a program to take input of a numbers and find weather it is perfectnumber or not.HINT : Perfect number is a number having sum of all its factors equal to doublethe number itself eg. 6 is perfect number as 1+2+3+6=12

    5. WAP to take input of a numbers and find weather it is Armstrong number ornot.

    HINT : A number having sum of cubes of individual digits adds up to number itselfis called Armstrong number.

    Eg. 153 is Armstrong number as 1 + 5 + 3 =153

    6. Input a number and find reverse of the number. Eg. If input is 465 the outputshould be 564

    7. Take appropriate input and calculate area/volume of different figuresa. Rectangleb. Squarec. Circled. Triangle

    The program should be menu driven. (Use switch-case )

    8. An Electricity board charges following rates to domestic users to discouragelarge consumption of energy

    a. First 100 units : 60 P/unitb. Next 200 units : 80 P/unitc. Beyond 300 units : 90 P/unit

    All users are charged minimum of Rs. 50. If total Amount is >300 then additionalsurcharge of 15% is added. WAP to read users name and units consumed andcalculate the amount payable.

    9. Write A program to find the sum of the following series:a. 1+3+5+7 n termsb. 1 - x/2! + x^4/4! - x^6/6! + ....... x^n/n!

    10. Write Programs to produce following type of outputs (Nested Loops)1

    12112321

    1234321

  • 8/3/2019 60877735-List-of-Programs-Class-XI-2011-12

    2/3

    STRING MANIPULATION

    11. write a menu driven program to do the following with string input :(Develop UDFs (User Defined Functions)

    MENU1. find the length of string2. Count No. of words3. Palindrome check4. count number of vowels, alphabets, digits

    5. Replace every first alphabet of word with capital letter

    6. Exit

    ARRAYS (1 D)

    12. Write a menu driven program to perform various operations on integerArray (1-D)

    a. Createb. Displayc. Search (Linear search)

    13. Write a menu driven program to perform various operations on integerArray (1 D)

    a. Createb. Displayc. Insertiond. Deletione. Modification

    14. Write a menu driven program to perform various operations on array ofnames (Strings)

    a. Create arrayb. Display arrayc. Bubble sortd. Exit

    15. Write a menu driven program to perform various operations on array of

    integersa. Create arrayb. Display arrayc. Merging two arrays (Both should be pre sorted )d. Exit

    ARRAYS (2-D)

    16. Write a menu driven program to perform various operations on 2 -D arrayof integers (Matrix)

    a. Create Matrixb. Display Matrix

    c. Transpose ofMatrixd. Lower triangle printing (1 and 2)e. Upper triangle printing (1 and 2)f. Exit

    17. Write a menu driven program to perform various operations on 2 -D arrayof integers (Matrix)

    a. Addition of two Matrixb. Subtraction of two matrixc. Multiplication of two matrixd. Exit

    18. Write a menu driven program to perform various operations on 2 -D arrayof integers (Matrix)

    a. Create Matrix

  • 8/3/2019 60877735-List-of-Programs-Class-XI-2011-12

    3/3

    b. Display Matrixc. Sum of rowsd. Sum of columnse. Sum of diagonalsf. Exit

    PROJECT

    Consider the following structure for storing data related to a student:

    struct stud

    { int roll;Char Name [20];Char Address [20]Char fname[20]; // fathers nameInt m[5]; //Marks in 5 Subjects

    };

    Display the following menu for at least 5 students (Array of stud type) (use functions):-

    Create array // To accept data of 5 studentShow // To display data of 5 student

    Report card // to display report card of given roll no.Name list //to display data sorted on names

    Merit List. // should have the roll no., name, total and averageGrade card Generation:

    // should have roll no., name, total & grade for all thestudents (according to roll no.)

    Criteria of grade are: -Average Grade

    >=90 A=75 B=60 C=40 D