Kulachi Hansraj Model School Computer Science (083) Practical File for Class XI (2013-14)
Must have minimum 15 programs from the topics covered in class XI course. • Configuration of Computer System • PowerPoint Presentation sorter dump • 6 Programs on Control structures • 4 Programs on Array manipulations • 4 Programs on String Manipulations • 1 Programs on macro • 2 Programs on structure manipulations • EXTRA Programs
Index for C++ Programming Name: ____________________________ _____________________________ _
Last Last Last Last SN. 1. 2.
3.
4.
Date Date Date Date
of of of of
Submission Submission Submission Submission
Section: ___
(Program (Program (Program (Program
No. 1 No. 7 No.11 No.15
– 6) - 10) – 14) – 17)
Roll No.: ____
2/09/2013
Program Description Write Write a progr program am in C++ C++ which which accep accepts ts tempe temperat ratur ure e in Fahrenheit and converts it into temperature in Celsius. (HINT : C=(F-32)*5/9 ) Write a program in C++ which accepts roll no, marks in 5 subjects from user, calculates total, percentage and prints grade. Grade is given on the bases of following criteria: If percentage >=80 Grade A If percentage =60 Grade B If percentage =50 Grade C otherwise Grade D Write a menu driven program in C++ which accepts 2 integers and performs one of the five operations as shown in the menu : MAIN MENU 1. ADD 2. SUBTRACT 3. MULTIPLY 4. DIVIDE 5. REMAINDER a) Writ Write e a C++ progr program am to gene generate rate and and print fi first rst N terms of the Fibonacci series. Eg. if N=7 OUTPUT : 0 1 1 2 3 5 8 b) Writ Write e prog programs rams t to o inpu input t the val values ues of x and n and sum up n terms of the following series: 1-
x
3
3!
+
x
5
5!
-
x
7
7!
. . .
#1/4
Topic Sequence
Control Structures
SWITCH-CASE
(Any One) Looping Control Structures
5.
6.
a) b) c) d) e) f) g) h)
Prime no. no. cche hecck Factors of a number, counting counting no. of factor factorss and sum of all factors. Check Check a number number for perfec perfectt nu numbe mber r Che Check ck a num number ber for Armstr Armstrong ong number number Reve Revers rsee a gi give ven nn num umbe ber r Fact Factor oria iall o off a gi give ven nn num umbe ber r Prog Program ram which which accep accepts ts a n number umber in base base 10 and prints prints numb number er in base 2 Che Checki cking ng a num number ber for pal palind indrom romee
(Any One) Control Structures Looping
WAP to generate n lines of the following patterns on the computer screen: (i) If n is 4, the (ii) If n is 4, the output is output is 1 ******* 121 ***** 12321 *** 1234321 *
(iii) If n is 7, the output is * * * * * * * * * * *
(iv) If n is 9, the output is * * * * * * * ********* *******
*
Control structures Looping
***** *** *
7.
8.
9.
Wr Writ ite e a prog progra ram m to read read a stri string ng and and prin print t out out the the following : 1) No. of of capi capital tal a alphabet lphabets, s, 2) No. of small small alphabets alphabets, , 3) No. of non-alp non-alphabe habets, ts, 4) No. of of Wor Words ds. . (Use suitable functions for each operation) Write Write a pro progr gram am to read read a strin string g and and pri print nt it af after ter repla lac cing ea eac ch of its cap api ital al alp phab abe ets by the corresponding small alphabet and each small alphabet by its corresponding capital alphabet and space with # sign Eg.INPUT STRING: is tHe Antidote to FEAR. OUTPUT: Knowledge kNOWLEDGE#IS#ThE#aNTIDOTE#TO#fear. Write a program to input a string. If the string is a pa pali lind ndro rome me th then en co conc ncat aten enat ate e “Hel “Hello lo Pa Pali lind ndro rome me “, otherwise concatenate “Hello Non-palindrome “ with the given string. Then display the resultant string. Eg. if Input string is ARORA Output : Hello Palindrome ARORA If Input string is COMP Output : COMP Not a Palindrome
#2/4
String manipulation
String Manipulation
String Manipulation
10.
11.
12.
Write two User Defined Function void Encode()which accepts a string as its parameter and encodes it. void Decode() which accepts encoded string and decodes it back to original string. Example : INPUT string: This is a COMPUTER World ENCODED string: Uijt jt b DPNQVUFS Xpsme Wr Writ ite e menu menu driv driven en prog progra ram m whic which h give gives s opti option ons s for for calling both the functions. Wr Writ ite e a pr prog ogra ram m in c++ c++ whic which h crea create tes s an ar arra ray y of integers and allows user to a. Pri Print nt the the a arr rray ay b. Find Find Larg Larges est t c. Find Find S Sma mall lles est t d. sear search ch f for or a give given n nu number mber e. SUM of a all ll t the he e elem lements ents f. Aver Average age f al all l th the e el eleme ements nts
String Manipulation
Array 1-D
a) Write Write a prog progra ram m to inp input ut n (
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.