Noob problem, break not ending lines

So I have this code I'm trying to do for writing out compound interest for a given amount over months. When I compile it all the months and number crunches come out on the same line and I can't figure out why the break; in the if statement isn't ending the lines. Any suggestions?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
#include <cmath>
#include <ctime>


int main()
{
  double p;	// principal at beginning of period
  double r;	// rate of annual interest (as decimal)
  double a;	// amount at end of period
  int    m;	// month index
  string s;	// month name (abbreviated)

  cout << endl;
  cout << "Monthly Compound Interest Program"    << endl;
  cout << "---------------------------------"    << endl;
  cout << "When prompted, enter starting amount" << endl;
  cout << "(as positive number, with no dollar"  << endl;
  cout << "sign of commas)"                      << endl << endl;
  cout << fixed << showpoint;
  cout << setprecision(2);

  while(true)
  {
    cout << "Starting amount?: ";
    cin  >> p;
    cout << endl;
  
    if (p > 0)
      break;
      else;
      cout << '\a';
      cout << "Must be positive number; try again" << endl << endl;
  }

  cout << "         E n d i n g  B a l a n c e" << endl;
  cout << "       ----------------------------" << endl;
  cout << "Mon.         2%        4%        6%" << endl;
  cout << "----   --------  --------  --------" << endl;

  for (m = 1; m <= 12; m++)
  {
	  
    switch (m)
    {
		
      case 1:
        s = "Jan. ";
        break;
      case 2:
        s = "Feb. ";
        break;
      case 3:
        s = "Mar. ";
        break;
      case 4:
        s = "Apr. ";
        break;
      case 5:
        s = "May  ";
        break;
      case 6:
        s = "Jun. ";
        break;
      case 7:
        s = "Jul. ";
        break;
      case 8:
        s = "Aug. ";
        break;
      case 9:
        s = "Sep. ";
        break;
      case 10:
        s = "Oct. ";
        break;
      case 11:
        s = "Nov. ";
        break;
      case 12:
        s = "Dec. ";
        break;
    }
	
    cout << s;

    for (r = .02; r < .08; r = r + .02)
    {
		
      a = p * pow ( 1 + r / 12.0, m);
      cout << setw(10) << a;
    }
  }
}
It has nothing to do with break;.
The break works just fine.

Just insert cout<<endl; between line 95 and 96. So it reads..
1
2
3
4
5
      cout << setw(10) << a;
    }
	cout<<endl;
  }
}
Thank you so much shadowCODE it runs perfectly now!
Topic archived. No new replies allowed.