Read Two Numbers and Count the Conversions
EasyRead an int and a double from standard input with a single scanf call, then print each value back and print how many conversions scanf reported. Declare quantity as an int initialized to -1 and price as a double initialized to -1.0, because one test feeds in text that is not a number: scanf will convert nothing and leave both variables exactly as you initialized them, and those are the values your program must print. Remember that a double is read with %lf even though it is printed with %f, and that every variable scanf writes into is passed as an address with &.
Success Criteria
Your code must pass 3 test case(s) to complete this exercise. 3 hint(s) are available if you need help.
Sign in to track your progress
You can work on exercises as a guest, but sign in to track your progress and save your submissions.