URGENT!! using cprintf and cscanf, cout and cin in c++

Hi! My teacher said that when we use gotoxy, we cannot use cout anymore. she said that we should only use cprintf and cscanf. but when I used cin and cout, it worked! and also why is it that when i use cscanf, it stops working?


gotoxy(1,2); cprintf("How much did you pay?");
cscanf("%f",&money);

money+=money_2;

gotoxy(1,3); cprintf("Your change is %.2f",money);

but when I use cin, it works? also, how do I put 2 decimal places using cprintf?

gotoxy(1,2); cout<<"How much did you pay?";
cin>>money;

money+=money_2;

gotoxy(1,3); cout<<"Your change is "<<money;

Thanks in advance!
Last edited on
Topic archived. No new replies allowed.