I want to use fscanf to get a number from the user , but the problem with this is that the computer thinks that f1.2 and 1.2f are the same number . ( The f stands for aperture ) . How do I check wether the user enters the f in the end and if he does , alert him that a wrong value was entered. The code would simply need to look at the last character and if its an f it needs to ignore th input . Please be detailed if possible im only a beginner to c . thanks and VERY much appreciated.
0 comments:
Post a Comment