Sunteți pe pagina 1din 18

SIMPLE

1. Enter your name and display it.


2. Enter a number and display it.
3. Display the sum of any two numbers.
4. Display the average of five numbers.

5. Display the bill to pay. Raman bought 10 pencils of worth Rs. 25/- and 12 color pens
worth Rs. 24/-

6. Display the bill to pay. Raman bought 10 pencils for Rs 2.50 each and 12 color pens for
Rs. 5 each.

7. Display the bill to pay. Raman bought 10 pencils and 12 color pens.
8. Display the entered hours, minutes and seconds into total seconds.
9. Display the electricity bill to pay on the basis on current and previous reading. Charges
per consumed unit is Rs 3/-.
10. Display the hotel bill to pay on the basis of invited guests. All the guest will have soup,
dinner and desert. 8% sales tax will be imposed on bill.

11. Display the cost of dozen pencils. Cost of 5 pencils is Rs. 12/-

12. Convert the temperature given in Fahrenheit into Celsius.


[ C=5/9(F-32) ]

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
CONDITIONS

13. Display “Cheap” or “Expensive” for given book cost.


[Compare with Rs. 1000 ]

14. Display “More” or “Less” or “Equal " for entered number.


[ More number is more then 500 ]
15. Display “Got Admission” or “Not Admission” on the basis of entered percentage.
[ Got admission – percentage is more then 70 ]
16. Display “Got Admission” or “Not Admission” on the basis of entered hindi, English,
math and computer marks.
[ Got admission – percentage is more then 70 ]
17. Display the smallest number from entered 2 numbers.
18. Display “Eligible” or “Not Eligible” on the basis of Math and Science marks.
[ Eligible – Marks should be more then 60 in both subjects ]
19. Display “Eligible” or “Not Eligible” on the basis of Math and Science marks.
[ Eligible – Marks should be more then 60 in any one subject ]
20. Display the smallest number from entered 3 numbers.
21. Display “Can vote” or “Can’t vote” on the basis of entered age and nationality of voter.
[Can Vote, if voter’s age is more then equal to 18 and nationality must be Indian ]
22. Display “Got Admission” or “Not Admission” on the basis of category and percentage.
[Got Admission, if category is general and percentage is more than 75. If category is SC
and percentage is more than 50]
23. Display final marks. If student got total marks less than 500 than give him/her 50 grace
marks. Display message too “You have got grace marks” or “Well done, you don’t need any
grace marks”.
24. Display the net salary on the basis of basic salary.
Net Salary = Basic Salary + Bonus
[ Bonus is Rs. 500/- when salary is less than Rs. 2000/- ]

25. Display the net salary on the basis of basic salary.


Net Salary = Basic Salary + Gross
Gross = DA + Hra + Ma - Deduction.
Deduction = It + PV.
[If basic is more than Rs. 9000/- than It=12% of basic, Da=8%, Hra=8%, Ma=9%, Pv=5%
otherwise Da=6%, Hra=10%, Ma=12%, Pv=5%]

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
26. Display amount to pay for consumed unit for entered previous and current reading.
[Charge per unit is Rs. 1.30/- per when consumed unit is less than 400 otherwise Rs.
2.50/-]
27. Enter a number and display “Positive” or “Negative” or “Zero” for it.
28. Display amount to pay for consumed unit for entered category, previous and current
reading.
[Category is commercial and units is more than 500, than charge per unit is Rs. 5/-
otherwise Rs. 3.50/-, if category is general and unit is more than 500, than charge per unit is Rs.
3.50/- otherwise Rs. 2/-]
29. Display the amount to pay for consumed unit for entered previous and current reading.
[Charge for first 100 units are Rs. 1.20/-, next 100 units Rs. 2.30/- and for rest Rs. 3.50/-]
30. Display “Even” or “Odd” for entered number.
31. Display “Leap Year” or “Not Leap Year” for entered year.
32. Display “Divisible” or “Not Divisible” for entered number by 3.
33. Display “Divisible” or “Not Divisible” for entered number by 2 and 10 both.
34. Display the division on the basis of given total.
[First -> percentage should be more than equal to 60. Second -> percentage should be in
between 45 and 59. Third -> percentage should be in between 33 and 44. Failed -> percentage
should be less then 33]
35. Display rollno, name, class, total, percentage and division for entered rollno, name,
class and marks of 5 subjects.
36. Display the simple interest for entered principal, interest rate and period.
37. Display menu for
1. Addition
2. Subtraction
3. Multiplication
4. Division
and perform desired action on the entered 2 numbers.
38. Display “Vowel” or “Not Vowel” for entered character.
39. Display total expenditure of party on the basis of invited guests. All the guests will have
coffee, dinner and desert after dinner. If the number guests are more than 100, you can get
discount of 6% on bill. You have to pay 8% tax on Bill.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
40. Display the state of person on the basis of entered age.
[Child – age between 1-12, Teenager – age between 13-19, Young – age between 20-30,
Mature – age between 31-50, Old – age between 51-75, Too Old – age above 75]
41. A department store places an order to a company for M pieces of electric mixer, N
pieces of toaster and P number of pieces of oven. The discount allowed for various items are
10%, 15% and 12.5% respectively. Company gives 5% discount, if the bill exceeds Rs. 10000/-.
Company charges 11% as sales tax on all items. Display the total amount to pay.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
LOOP

42. Display entered name 50 times.


43. Display entered 10 different numbers.
44. Display your good name as many times you want to display.
45. Generate 1, 2, 3, ………………………………….., 100.
46. Generate 100, 99, 98, ………………………………, 1.
47. Generate 2, 4, 6, 8, …….…………………………, 100.
48. Generate 1, 3, 5, 7, ………………………………., 99.
49. Generate 5, 10, 15, 20, ………………………….., 100.
50. Generate 100 even numbers.
51. Generate even numbers upto 100.
52. Generate 100 even numbers from 50.
53. Generate 10 odd numbers from 101.
54. Generate table for entered number.
55. Generate 1, 4, 9, 16, …………………………….., 100.
56. Generate 100, 81, 64, ……………………...………., 1.
57. Generate 1, 8, 27, 64, ……………………………, 1000.
58. Generate 0, 3, 8, 15, …………………………….., 99.
59. Generate 2, 5, 10, 17,……………………………., 101.
60. Generate 1-1, 2-4, 3-9, 4-16, ………………..., 10-100.
61. Generate 1-0, 2-3, 3-8, 4-15, ………………...., 10-99.
62. Generate 99, 80, 63, ……………………………...., 0.
63. Generate 1-0-2, 2-3-5, 3-8-10, ………….., 10-99-101.
64. Generate 0, 1, 1, 2, 3, 5, 8, 13, ………..………., 100.
65. Display the Factorial of given number.
66. Display the sum of digits of entered number.
67. Display the entered number in reverse order.
68. Display “Palindrome” or “Not Palindrome” for entered number.
69. Display that given number is Armstrong or not.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
70. Display that given number is Prime or not.
71. Display the greatest number from entered 10 numbers.
72. Display the smallest number from entered 10 numbers.
73. Display the sum of entered 10 numbers.
74. There are 25 students in a class. Enter the gender [G/B] and display the total numbers of
boys and girls.
75. Display menu for
1. Cube
2. Square
3. Factorial
4. Table
and perform desired action for entered a number.
76. Display menu for checking for entered number for Prime, Armstrong, Odd and Even.
77. Display the count of numbers from 1 to 100, which are divisible by 2, 3 and 5.
78. Enter the marks from 1-100 for 25 students and print the number of students.
 in the range 0-40
 in the range 41-60
 in the range 61-80
 in the range 81-100.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
NESTED LOOP

79. Display tables from 2-10.


80. Display the table from desired number to desired number.
81. Generate
*
* *
* * *
* * * *
* * * * *
82. Generate
* * * * *
* * * *
* * *
* *
*
83. Generate
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
84. Generate
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
85. Generate
5 4 3 2 1
5 4 3 2
CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
5 4 3
5 4
5
86. Generate
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
87. Generate
5
4 5
3 4 5
2 3 4 5
1 2 3 4 5
88. Generate
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
89. Generate
1
2 3
4 5 6
7 8 9 10
90. Generate
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
91. *
* *

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
* * *
* * * *
* * * * *
92. * * * * *
* * * *
* * *
* *
*
93. Generate
1
0 1
0 1 0
1 0 1 0
1 0 1 0 1
94. Generate 51, 52, 53, 54, 55, 61, 62, 63, 64, 65, 71, 72, 73, 74, 75, 81,
82, 83, 84, 85, 91, 92, 93, 94, 95.
95. Give Result x + x2/2 + x3/3 + x4/4
96. Give Result 1 + x + x2/2 + x3/3 + x4/4
97. Give Result 1/x + 1/x2 + 1/x3 + 1/x4
98. Give Result 1 + 1/x + 1/x2 + 1/x3 + 1/x4
99. Give Result 1 + 1/x + 1/x2 + 1/x3 + 1/x4 + …….. 1/xn
100. Give Result 1 + x + x2/2 + x3/3 + x4/4 + …………. xn/n
101. Generate
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
102. Generate
1
2 1 2
3 2 1 2 3
4 3 2 1 2 3 4
5 4 3 2 1 2 3 4 5
CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
103. There are 5 classes having 50 students each. Display the total numbers of boys and girls
for each class and grand total of girls and boys too.
104. Display “Unique Number” or “Not Unique number” for entered number.
[ Digit not repeated ]
105. Display all Prime numbers from 2 to 100.
106. Display all Armstrong numbers from 1 to 1000.
107. Display all Leap Years from 1900 to 2000.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
STRING MANIPULATION

108. Display the entered string in this format


M
ME
MEM
MEMO
MEMOR
MEMORY
109. Display the entered string in this format
MEMORY
MEMOR
MEMO
MEM
ME
M
110. Display the entered string in this format
MEMORY
EMORY
MORY
ORY
RY
Y
111. Display the length of entered string.
112. Display the character of entered string in next lines.
113. Display the ASCII value with character for entered string.
114. Display number of punctuation marks, spaces and digits for entered string.
115. Display the numbers of words for entered string.
116. Display the number of specified character found in entered string.
117. Display the entered string in reverse order.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
118. Display the entered text into UPPER CASE.
119. Display the entered text into lower case.
120. Display the initial of string in Upper Case:
entered string : viKAs kuMaR sInGh
converted string : V.K.S.
121. Display “Palindrome” or “Not Palindrome” for entered string.
122. Display “Same” or “Different” for entered two strings.
123. Enter first name, middle name and last name. Join them into one string, than display.
124. WAP to extract specified number of characters from left side of entered string and print.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
ARRAY
125. Display the entered 10 numbers with their grand total.
126. Display the entered 10 numbers along with their average.
127. Display the entered 10 numbers along with smallest number.
128. Display the entered 10 numbers along with greatest number.
129. Display the entered 10 numbers along with greatest and smallest number.
130. Display the average of greatest number of entered array.
131. Display the entered 10 numbers in ascending order.
132. Enter an element in array.
133. Delete an element from an array.
134. Store the sum of 2 arrays of 10 numbers to 3rd array and display all in following format.
[Array1 + Array2 = Array3]
135. Enter numbers in n * n matrix and display it in matrix mode.
136. Enter number in n * n matrix and print the total of each row, each column and each
diagonal.
137. Display the sum of 2, n*n matrices to 3rd matrix.
138. Display the multiplication of 2, n*n matrices to 3rd matrix.
139. Display the Actual and Transposed matrix of n * n.
140. Enter values in two arrays and find their Common in third array.
Ex.
First Array : {2,5,8,10,20}
Second Array : {3,5,8,9,15,20}
Common Array : {5,8,20}
141. There are 4 regions in which there are 5 salesmen, sale products. Enter the quantity of
product sold by each salesman for each region. Display the grand total of sale products for
region and salesman.
142. Enter the record of 5 customers for a bank. [Account no., Customer Name, Balance] and
perform following.
1. Display the report of all customers in formatted way.
2. Display the record of customer for given account number.
3. Make transaction [Deposit/Withdraw]. One can withdraw, when after withdrawal
account has minimum Rs. 500/- left.

4. Exit
CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
FUNCTIONS

143. Write a function to draw a line.


144. Write a function to draw a line with our specified character.
145. Write a function to draw a line with our specified character and that character, specified
times.
146. Write a function to display Average [Use with argument and no return value function].
147. Write a function to display Average [Use with argument and return value function].
148. Write functions to perform the job, selected from menu, which is laid in main function,
for 2 numbers. Get both numbers in sub function, perform calculation and display result in the
same.
1. Addition
2. Subtraction
3. Multiplication
4. Division
149. Write functions to perform the job, selected from menu, which is laid in main function,
for 2 numbers. Pass the numbers as arguments in sub function, perform calculation in sub
function and display result in the same.
1. Addition
2. Subtraction
3. Multiplication
4. Division
150. Write functions to perform the job, selected from menu, which is laid in main function,
for 2 numbers. Pass the numbers as arguments in sub function, perform calculation in sub
function and display result in the main function.
1. Addition
2. Subtraction
3. Multiplication
4. Division
151. Write function to calculate the length of passed string to sub function. Display the
length in main function.
152. Write function to display the passed string in reverse order.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
STRUCTURES / CLASS

153. Write function for following and perform selected job from menu for this.
structure student
{ int rno,cl,m1,m2,m3,m4,tot;
char nm[20];
};
1. Get record
2. Calculate total
3. Display record [with percentage and division]
4. Exit
154. Enter record for 10 employees and perform work according to menu.
structure employee
{ int cd,bs;
char nm[20],dpt[30];
};
1. Display all records in report format. [Display Net Salary too. Net Salary is not the
part of record and must be calculated. Net Salary = Basic Salary + 10% of Basic Salary
2. Display records for specified department.
3. Display record for specified code.
4. Make changes for specified code.
5. Exit
155. Enter 10 records of students. Enter Code, Name and Marks of five subjects and prepare
marklist for all, with total, percentage and division.
156. Enter record of 10 trains and prepare time chart. Give the details of enquired train by
train number. Record must consists Train Number, Train Name, Platform Number, Arrival
Time and Departure Time.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
FILE HANDLING (SINGLE)

157. Maintain a Student Database, which have following fields:


Roll Number, Student Name, Class, Hindi Marks, English Marks, Science Marks, Computer
Marks
Perform these activities:
1. Create database.
2. Append database.
3. Modify records.
4. Delete records.
5. Display records for specified roll number.
6. Display all records in report format with Roll Number, Name, Class, Total,
Percentage and Division.
7. Display report for those students, who secure First Division.
8. Display report for those students, who get failed.
9. Display report class wise.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
FILE HANDLING (MULTIPLE)

158. Maintain following databases


Stock Database
Fields : Product Code, Product Name, Price, Quantity, Reorder Quantity
Daily Database
Fields: Product Code, Transaction Quantity, Transaction Type, Transaction Date.
Perform these activities
1. Create Database.
2. Append records in Stock.
3. Delete from Stock.
4. Make changes in Stock.
5. Make daily transaction [Sale/Purchase].
6. Display total sale/purchase for specified product.
7. Display transaction made at specified date.
8. Display transaction made in specified month.
9. Display report for all products.
10. Display report of those products, which need to be reordered.
159. Maintain following databases
Student Database
Fields: Roll Number, Student Name, Class, Total
Marks Database
Fields: Roll Number, Drawing Marks, Hindi Marks, English Marks, Science Marks, Computer
Marks.
Perform these activities
1. Create database.
2. Append record in Students and in this program append the record for same roll
number in marks [except roll number all the fields are empty/have zero].
3. Delete record [from both databases].
4. Modify record in Student.
CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754
5. Modify record in Marks.
6. Update Student database from Marks database.
7. Display report for all students with total.
8. Display report for all students’ class wise.
9. Display full record for specified roll number.

CCED – Centre for Computer Education and Development Phone : 9027763003, 9528416434, 8791601754

S-ar putea să vă placă și