Computer Science, asked by sooslippery, 6 months ago

How to write if amount is greater than 1000 and less than 10,000 , the commission is 4000 else it is zero using ternary operator

Answers

Answered by imtiyazallam
3

Answer:

commission = (amt > 1000 && amt < 10000)? 4000 : 0;

Answered by anindyaadhikari13
2

Question:-

Write the statement using ternary operator.

Statement:-

The expression can be written using ternary operator as,

commission=(amount>1000&&amount<10000)?4000:0;

Similar questions