Rewrite the following using ternary operator:
int bill;
double discount;
if(bill>1000)
discount=bill*10.0/100;
else
discount=bill*5.0/100;
..any one plzzzz
Answers
Answered by
3
Answer:
int bill;
double discount;
bill > 100 ? discount = (10.0/100) : discount = (5.0/100);
please mark brainliest
Similar questions