I need a program that displays the number of days in each month. When I tried to execute the code, it gave me a black screen with a bunch of fast running digits/letters(couldn't see, very fast). and then it just stopped. Did I do something stupid in my code? I appreciate any help.
#include <iostream>
#include <string>
using namespace std;
int main()
{
int i=0;
string month[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[] = {31,28,31,30,31,30,31,31,30,31,30,31};
{
for(i=0;i<12;i++);
{
cout << month[i]<<" has "<<days[i]<<" days.";
}
system("pause");