首页 > 科技
Programming Assignment 5
In-class portion:
Create a menu-based program with the following options1. Request a string from the user. This string may contain any symbol but will be limited to a
length of 50 characters.
2. Convert the string to lower case.
3. Remove all non-alphabetic characters(keep only a-z or A-Z).
4. Determine if the string is a palindrome(the same forwards and backwards).
5. Print the current string.
6. Exit the program.
If the user enters something other than 1-6 during the menu, the program should display an error
message.
The menu and options 1, 5, and 6 will be developed in class. The rest of the assignment will be to
implement the functionality for options 2, 3, and 4.
Each option that handles the string will require the offset of the string to be passed to that
procedure. When a procedure that mutates the string is called, these changes should be reflected
in the original string.
Example: The user inputs the string “ab%$ BA”
After option 2 the string will become: “ab%$ ba”
After option 3 the string will become: “abba”
Option 4 should print that the string “abba” is a palindrome.
Irvine library functions to copy, compare, clear, or convert a string to lowercase are not allowed for
this program. You must develop your own functions. You may use the Irvine functions for ReadString
and WriteString.
You must use the code provided, your submission should only finish the procedures that are
incomplete and insert the necessary calls to those procedures in main. As always, sufficient
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- 搜索
-
- 01-15东莞市威勤户外用品有限公司:一站式高品质户外用品服务专家
- 01-15AI+电气时代纷至沓来,下一代数据中心HVDC如何发展?
- 01-15助听器选购指南:为什么爱可声助听器更值得入手?
- 01-152024国民消费“科技赋能”创新案例:Shokz韶音助推运动耳机音质升级
- 01-14暗揭湖南省康宸新材料有限公司客户对于全屋定制的环保性也是相当认可
- 01-14解谜武汉葳蕤繁祉百货有限公司时尚十元店秘诀就是它专业为出众而生
- 01-13Terra平台震撼来袭,引领WEB3新时代!
- 01-13中网智媒人工智能生态基金增值4.7倍,上市突破百倍指日可待!
- 01-11东莞赛铠机械:高品质混炼设备,助力中国智造崛起
- 01-11东莞市威勤户外用品有限公司:一站式高品质户外用品服务专家
- 标签列表