Problem - the program is displaying wrong output when


Programming Language : C++

Problem - The program is displaying wrong output when entering a number

If number is 0-9 it displays " 0 is less than 10" ------ [ this one works correctly]

if number is 11 it displays "4213412 is greater than 10"

if number is 10 it displays " 3794234123 is equal to 10"

// compare iInput to integer 10
if (iInput < 10) // if input is less than 10
wsprintf(wcOutput, TEXT("%i is less than 10"), iInput);
if (iInput > 10) // if input is greater than 10
wsprintf(wcOutput, TEXT("%i is greater than 10", iInput));
else // if input is equal to 10
wsprintf(wcOutput, TEXT("%i is equal to 10", iInput));

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Problem - the program is displaying wrong output when
Reference No:- TGS02901397

Expected delivery within 24 Hours