My code is not giving correct output

please look into my code. it’s not giving the exact output

@Anku47 what problem are you facing with output, according to me code works fine.

sir here it is showing the price twice that is 100100

that is the problem

@Anku47 this is because you are printing price twice!
" price: "<<c.price<<c.price<<endl;
do it -> " price: "<<c.price<<endl;

thank you sir. now it’s working fine…i found the mistake

sir i have sent some other doubts also. please look into those doubts also.

@Anku47 don’t worry they will be taken!

1 Like