Why my program giving wrong output

im getting wrong anwer for this question need help

hello @mdhammad139
pls share ur code using cb ide

print output for each cases in seprate line

ok sir… thanx…