write a program using standard string functions that accepts a price of an item and display its coded value. The base of the key is:
X C O M P U T E R S
0 1 2 3 4 5 6 7 8 9
sample input/output:
Enter Price: 489.50
Coded Value: PRS.UX
how to make it in c++.. pls need an asap answer. and some basic codes only please. thankyou.
As AbstractionAnon mentioned, we won't solve this for you, as per the forum rules.
However, to get you started, here's some tips:
The letters (XCOMPUTERS) can be stored in an array.
Arrays are zero-indexed, so code[0] will be X, code[1] will be C, and so on.
All you need to do when you have that array is get every digit separately, for which you can use a function that gets a single character from the input.
That's almost giving you the solution, so I won't give any more information until you show us some code.
If you still struggle, post the code and we'll be happy to help you along.