here's a question regarding changing units, say from g to kg without changing the entire codes....
my mathematical equation uses KG (kilograms), but the user can choose whether to enter values in G or KG. if the user entered the option in G, how can i convert from the string "KG" to "G" for every of the term in console.writeline that i do without repeating each time?
in example
console.writeline("enter mass (KG) : ")
mass = console.readline ()
needs to be viewed as
console.writeline("enter mass (G) : ")
mass = console.readline ()
how to swap "KG" to "G" without altering the whole thing???
Thanks :-)