Computer Science (083) Practical File for Class XI |
Index for C++ Programming |
SN. | Program Description | Topic |
1. | Write a program to play the following game:The player guesses a number from 2 to 19 and then the program generates three random numbers from 101 to 199. If the sum of the digits of any of these numbers matches the player’s number, then the player is declared a winner otherwise the player looses the game. | C++ Revision(Class XI) |
2. | Write a function to generate the nth term in a Fibonacci sequence. Use this function to print first N terms of the sequence. | C++ Revision(Class XI) |
3. | Write programs to input the values of x and n and sum ...view middle of the document...
Then display the resultant string. | C++ Revision(Class XI) |
8. | Write a program in C++ which accepts an integer array and its size as arguments/parameters and exchanges the values of first half side elements with the second half side elements of the array.Example:If an array of eight elements has initial contents as 2,4,1,6,7,9,23,10The function should rearrange the array as 7,9,23,10,2,4,1,6 | C++ Revision(Class XI) |
9. | Write a program to input n (<=20) integers in an array and then display the array after removing all the duplicate entries from it. | C++ Revision(Class XI) |
10. | Write a program to input the elements in a matrix of size m x n and do the following operations on it: (i) find the row sums (ii) find the column sums (iii) find the diagonal sums (iv) find the transpose (v) display the upper half (vi) display the lower half | C++ Revision(Class XI) |
11. | Write a program to input the morning, noon, and evening temperature for each of the seven days of a week and then display a report showing the following: 1. Maximum and minimum morning temperature 2. Maximum and minimum noon temperature 3. Maximum and minimum evening temperature 4. Average morning temperature 5. Average noon temperature 6. Average evening temperature 7. Average temperature of the week(Use a 2D array) | C++ Revision(Class XI) |
12. | Write a menu driven program to use a macro, an inline function,...