When equal amounts are invested in each of three accounts paying a1% a2% and a3% interest, one year's combined interest income is $S. How much is invested in each account?(Input a1, a2, a3and S. Calculate and output result)
This isn't really a coding question, as you've posed it. It's a problem in algebra right now and one that I think you would benefit from trying to do yourself. If you have questions about how to implement in code that's fine, but a question about the formula is a math question.
If this is a question about algebra:
I think it's easiest to just break the problem down and try to write an algebraic formula for the income from a single account. Then, to get the profit from three accounts just add your formulas together.
If this is a coding question:
What have you tried to do so far? Can you post your code?
Well here's what I just coded, but i'm stuck with how to actually make it output the answer.
If anyone could please finish this, I would really appreciate it.
#include <iostream>
using namespace std;
int main()
{
int a1,a2,a3,s
cout << "Enter a1,a2, a3, s" << endl;
cin >>a1>>a2>>a3>>s;
usingnamespace std; and system calls are not preferred but that's not the end of the world. Other than that, not too bad as a start. What you need to do is make a decison what you are going to do with the numbers and how you will display the answers. :)