### IF STATEMENT QUESTION

Hi,everyone. May I know why the program only solve using the 1st "if" statement? For example, I insert 10 into "quantityOfT", and it is supposed to use
"else if (6<=quantityOfT<=10){
discountOfT= t*0.1*quantityOfT;"

, but it used "if (2<=quantityOfI<=5){
discountOfI= i*0.05*quantityOfI;"
 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121`` ``````#include using namespace std; int main(){ double i,t,o,c,totalDiscount,amountDue, quantityOfI,quantityOfT,quantityOfO,quantityOfC,discountOfI,discountOfT,discountOfO,discountOfC; double amountDueOfI,amountDueOfT,amountDueOfO,amountDueOfC; i=39.9; t=29.9; o=49.9; c=59.9; cout<<"Please insert the quantity of I"<>quantityOfI; if (2<=quantityOfI<=5){ discountOfI= i*0.05*quantityOfI; } else if (6<=quantityOfI<=10){ discountOfI= i*0.1*quantityOfI; } else if (11<=quantityOfI<=15){ discountOfI=i*0.15*quantityOfI; } else if (16<=quantityOfI<=20){ discountOfI=i*0.2*quantityOfI; } else if (quantityOfI>=21){ discountOfI=i*0.25*quantityOfI; } else { cout<<"pleasr type again."<>quantityOfT; if (2<=quantityOfT<=5){ discountOfT= t*0.05*quantityOfT; } else if (6<=quantityOfT<=10){ discountOfT= t*0.1*quantityOfT; } else if (11<=quantityOfT<=15){ discountOfT=t*0.15*quantityOfT; } else if (16<=quantityOfT<=20){ discountOfT=t*0.2*quantityOfT; } else if (quantityOfT>=21){ discountOfT=t*0.25*quantityOfT; } else { cout<<"pleasr type again."<>quantityOfO; if (2<=quantityOfO<=5){ discountOfO= o*0.05*quantityOfO; } else if (6<=quantityOfO<=10){ discountOfO= o*0.1*quantityOfO; } else if (11<=quantityOfO<=15){ discountOfO=o*0.15*quantityOfO; } else if (16<=quantityOfO<=20){ discountOfO=o*0.2*quantityOfO; } else if (quantityOfO>=21){ discountOfO=o*0.25*quantityOfO; } else { cout<<"pleasr type again."<>quantityOfC; if (2<=quantityOfC<=5){ discountOfC= c*0.05*quantityOfC; } else if (6<=quantityOfC<=10){ discountOfC= c*0.1*quantityOfC; } else if (11<=quantityOfC<=15){ discountOfC=c*0.15*quantityOfC; } else if (16<=quantityOfC<=20){ discountOfC=c*0.2*quantityOfC; } else if (quantityOfC>=21){ discountOfC=c*0.25*quantityOfC; } else { cout<<"pleasr type again."<