Question: C++ Program Information Write an algorithm which can store into a string variable the two letters which are the proper suffix of a particular integeras

C++

Program Information Write an algorithm which can store into a string variable the two letters which are the proper suffix of a particular integeras typically used for printing To test your algorithm, embed it in a program which reads an integer from the user and then displays it and its suffix form. For example, if the user entered the value 1, you would place 's' and't' into the string and display their number and your string (because first is also represented as '1st'- and since we can't exactly do 1t -ie. superscripting -without more font control than a terminal window typically allows). To refresh your memory, the pattern for suffices (suffixes?) is 1st 2nd 3rd 4th 5th 10th I11th 12th 13th 14th 15th . .. 20th 21st 22nd 23rd 24th 25th 30th 31st 32nd 33rd 34th 35th _.. 40th 101st 102nd 103rd 104th 105th... 110th 111th 112th 113th 114th 115th... 120th 121st 122nd 123rd 124th 125th_.. 130th 201st 202nd 203rd 204th 205th 211th 212th 213th 214th 215th 221st 222nd 223rd 224th 225th 210th 220th 230th To test your program, ensconce it within a yeso style loop to allow ease of testing. As an example, you might have the program interaction look something like (the parts in this coloration are typed by the user) s suffix_test.ou t Welcome to the Suffix Testing Program!!! Enter a value:1 That would be the 1st. Test another value? You bet! Enter a value: 11 I'd have to say the 11th. Test another value? yes Enter a value: 534252 That sounds like it could be the 534252nd. Test another value? nyeah Thank you for using the STP!! Endeavor to have a purple-textured day! Program Information Write an algorithm which can store into a string variable the two letters which are the proper suffix of a particular integeras typically used for printing To test your algorithm, embed it in a program which reads an integer from the user and then displays it and its suffix form. For example, if the user entered the value 1, you would place 's' and't' into the string and display their number and your string (because first is also represented as '1st'- and since we can't exactly do 1t -ie. superscripting -without more font control than a terminal window typically allows). To refresh your memory, the pattern for suffices (suffixes?) is 1st 2nd 3rd 4th 5th 10th I11th 12th 13th 14th 15th . .. 20th 21st 22nd 23rd 24th 25th 30th 31st 32nd 33rd 34th 35th _.. 40th 101st 102nd 103rd 104th 105th... 110th 111th 112th 113th 114th 115th... 120th 121st 122nd 123rd 124th 125th_.. 130th 201st 202nd 203rd 204th 205th 211th 212th 213th 214th 215th 221st 222nd 223rd 224th 225th 210th 220th 230th To test your program, ensconce it within a yeso style loop to allow ease of testing. As an example, you might have the program interaction look something like (the parts in this coloration are typed by the user) s suffix_test.ou t Welcome to the Suffix Testing Program!!! Enter a value:1 That would be the 1st. Test another value? You bet! Enter a value: 11 I'd have to say the 11th. Test another value? yes Enter a value: 534252 That sounds like it could be the 534252nd. Test another value? nyeah Thank you for using the STP!! Endeavor to have a purple-textured day

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!