Hey guys I am having trouble figuring out the payment rule because i need my output numbers to double when even and triple when odd but it just spits out 1 which is what I need only for the first month
The 12 months should look like
1st month's payment 1 dollar.
2nd month's payment 2 dollars. (doubled the amount)
3rd month's payment 6 dollars. (triple it every other months)
4th month's payment 12 dollars. (double the amount)
5th month's payment 36 dollars. (triple it every other month)
6th month's payment 72 dollars. (double the amount)
7th month's payment 216 dollars. (triple it every other month)
and so on ...
mycodeisintmonth;cout<<"For how many months did they say you will recieve payments? ";cin>>month;cout<<endl;cout<<"Here are your monthly installment amounts: "<<endl;for(inti=1;i<13;i++){intMonth;intpayment=;cout<<"Month"<<i<<":"<<payment<<endl;if(i%2==0){payment=payment*2;}else{payment=payment*3;}}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1st month's payment 1 dollar.
2nd month's payment 2 dollars. (doubled the amount)
3rd month's payment 6 dollars. (triple it every other months)
4th month's payment 12 dollars. (double the amount)
5th month's payment 36 dollars. (triple it every other month)
6th month's payment 72 dollars. (double the amount)
7th month's payment 216 dollars. (triple it every other month)
and so on ...