Professional Documents
Culture Documents
If 0<k<=16
Display: Enter information:
Record answer as s[i]
Then,
Display: Entered data:
(Data… named as s[i])
Next,
Display: (1) Add data
(2) Remove data
(3) Exit program
Chosen number:
Record answer as y
If y = 1
Display: How many strings do you want to add(16-‘k’ strings left):
Record answer as y2
If y2 <= 16-k
Display: Entered data:
(Data… named s[i])
If y2>16-k
Display: Invalid! input is greater than the maximum strings
If y = 2
Display: How many strings do you want to erase:
Record answer as y1
If y1 > k
Display: Invalid! input cannot remove string more than the previous strings.
If y1<=k
k=k-y1
Display the data named s[i])
If 0 > k or k > 16
Display: Invalid input")