quick question, how do I make a list with a message box?
I've been only taught this method which is: MessageBox.Show ( " Initial Message ", "Title", MessageBoxButton.() , MessageBoxIcon.() );
However for my assignment, it tells me to format it like this

MessageBox.Show(a.ToString("C"), "Compound Interest", MessageBoxButtons.OK, MessageBoxIcon.Information);
This is what I have at the moment, but it only shows one message box at a time.
Is there any way to make it so all my calculations go into one message box?
This is my coding: A person invests $1000.00 in a savings account that yields 5% interest annually
const decimal r = 0.05m;
decimal p = 1000;
decimal a;
int n = 1;
while (n <= 5)
{
p = p + (r * p);
a = p;
n++;
MessageBox.Show(a.ToString("C"), "Compound Interest", MessageBoxButtons.OK, MessageBoxIcon.Information);
}