Make your own free website on Tripod.com

#include <iostream>

using namespace std;

 

int main ()

{

            int total;

            int no_of_months=0;

            double ave;

            int numOfDays = 0;

            int month [12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

 

            for (int i=1; i<=12; i++);

                        total += 100;

            cout << "Saving $100 per month for a year give you a total of $" << total <<endl;

 

            ave = total / no_of_months;

            cout << "Average monthly savings is $" << ave <<endl;

 

            for(int j=1; j <=12; j++)

                        numOfDays += month [j];

            cout << "The number of days in a year is " << numOfDays <<endl;

 

            char enter;

            cout << "This is the end of the Debug Example - Press Enter to Finish" << endl;

            enter=cin.get();

            return 0;

}