- 1. Print graphics
- 2. MadLibs
- 3. Calculator
- 4. Applications
- 5. Numbers
- 6. Conjectures
- 7. StudentMIS
- 8. Tickets System
- 9. Sequence List Basic System
- 10. Sequence List Application System
- 11. Link List Basic System
- 12. Link List Application System
- 13. Complexity of Algorithms
- 14. Queue Application System
- 15. Stack Application System
- 16. Sparse Matrix System
- 17. Triangular Matrix System
- 18. Idioms Solitaire(成语接龙)
- 19. Binary Tree System
- 20. Huffman Tree System
- 21. Graph System
- 22. BitOperation
- 23. BigNumber
- More to be coming...
Projects of C++
C++ Programming and Object-Oriented Design
Project 15. Stack Application System
菜单(Press 0 for English Menu)
Menu(按0切换到中文菜单)
1. Create Stack(创建栈)
2. Show Stack(显示栈)
3. Push to Stack(入栈)
4. Pop form Stack(出栈)
5. Get Top of Stack(获取栈顶元素)
6.Clear Stack(清空栈)
7. Palindrome String(回文问题)
A palindrome string is a sequence of characters which reads the same backward as forward, such as madam or racecar or abba.
Please check if a string is a Palindrome string.
8. Number System Conversion(数制转换问题)
To convert a number from source base to objective base. Each base of a number is between 2 and 62. Characters a-z stand for 10-35 and A-Z stand for 36-61.
9. Palindrome Number(数字回文问题)
A palindrome number reads the same backward as forward, such as 121 and 232. Of course, the property depends on the basis in which the number is represented.
For example, the number 75457 is a palindrome. The number 17 is not a palindrome in base 10, but its representation in base 2 (10001) is a palindrome.
The objective of this program is to verify if a given number is palindrome in any base from 2 to 62.
10. Brackets Matching(括号匹配问题)
Check wheter the brackets in the input string are matched exactly. The brackets include {,},[,],(,).
11. Hanoi Tower(汉诺塔问题)
You have 3 rods and N disks of different sizes which can slide onto any tower. The disks are sorted in ascending order of size from top to bottom. You have the following constraints:
* (A) Only one disk can be moved at a time.
* (B) A disk is slid off the top of one rod onto the next rod.
* (C) A disk can only be placed on top of a larger disk.
Write a program to move the N disks from the first rod to the last rod.
12. Expression Values(表达式求值)
Enter an expression with +-*/ and (), then caculate its value.
13. Backpack Problem(背包问题)
A backpack has a volume of T. There are N items with volumes of W0, W1...Wn-1. Ask if you can put some of these N items into the backpack so that the sum of their volumes is exactly T. For example:
(A)The volume of the backpack is T=10.
(B)The number of the items is N=6.
(C)Each volume of the items is W[6]={1,8,4,3,5,2}.
(D)The solutions are: (1,4,3,2) (1,4,5) (8,2) (3,5,2)
14. N Queens Problem(N-皇后问题)
The N-queen problem is the generalized problem of 8-queens or 4 queens' problem. Here, the N-queens are placed on a N * N chess board, which means that the chess board has N rows and N columns and the N queens are placed on thus N * N chess board such that no two queens are placed in the same row or in the same column or in same diagonal. So that, no two queens attack each other.
15. Maze Problem(迷宫问题)
Given a maze, find a path from start to goal.
16. Exit(退出程序)
|