In the code below I am taking a double and turning it into a integer, is that correct or just dropping everythng after the decimal? And then multipling two different data types? I wrote it I am just not sure I understand it completely.
double parentsBonds = 0.50;
double bondsPurchased;
int dollarNoBonds;
double parentBondsPurchased;
cout<<"Income Before Taxes: "<<grossIncome<<endl;
cout<<"Income after Taxes: "<<netIncome<<endl;
cout<<"Cost of School Supplies Purchased: "<<schoolSupplies<<endl;
cout<<"Cost of Bonds Purchased: "<<bondsPurchased<<endl;
I am taking a double and turning it into a integer, is that correct or just dropping everythng after the decimal
Yes. Everything after the decimal is dropped.
And then multipling two different data types?
If you multiply double with an int then int is converted to a double. For ex. int i = 10; double d = 12.5;
Now when i is multiplied with d, then i will be converted to 10.0