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
-
Zymeworks Announces FDA Clearance of Investigational New Drug Application for ZW171, a novel 2+1 T-cVANCOUVER, British Columbia, June 17, 2024 (GLOBE NEWSWIRE) -- Zymeworks Inc. (Nasdaq: ZYME), a clinical-stage biotechnology company developing a di2024-06-17
-
Indonesia Stock Exchange Partners with Nasdaq to Upgrade Market InfrastructureTechnology partnership will further enhance overall resilience and integrity of the exchange, while supporting the rapid deployment of new products2024-06-17
-
Adalvo 的 Liraglutide 預充式注射筆成為歐盟首款獲得批准的仿製藥馬爾他聖瓜安, June 17, 2024 (GLOBE NEWSWIRE) -- Adalvo 宣布 Liraglutide 預充式注射筆成功取得 DCP 批准,成為歐盟首款獲得批准的仿製藥。 根據 IQVIA 的報2024-06-17
-
促进生育,助力三胎——“三胎免费生”联合公益行动正式启动为积极响应国家号召实施三胎生育政策,扩大妇幼服务健康供给,在云南省优生优育妇幼保健协会指导下,昆明广播电视台联合昆明安琪儿妇产医院,于6月13日在昆明广播2024-06-17
-
学党史传承红色精神 守党纪筑牢自律防线——平安养老险湖南分公司党支部开展主题党日活动七一前夕,平安养老险湖南分公司党支部全体成员走进“千年学府、百年师范”——湖南第一师范,开展了一次学史明理、学史增信、学史崇德、学史力行的主题党日活动。重2024-06-17