Need help with loops

I need to write a program that takes two years that are input by the user and output every easter sunday in between those years. the problem is that I don't get how I'm supposed to display the years in between the input years. im completely at a loss as to what I should be doing, i guess i dont really understand loops all that well.

any help is greatly appreciated.

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
 
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>

using namespace std;

int main()
{
    int a;
    int b;
    int c;
    int d;
    int e;
    int yearone;
    int yeartwo;
    int sunday;
    string month;
    int count;
    int maxcount;
    bool datavalid;
    
    a = yearone%19; 
    b = yearone%4;
    c = yearone%7;
    d = (19*a+24)%30;
    e = (2*b+4*c+6*d+5)%7;
    
    sunday = (22+d+e);   
    
    cout<<"Press <ENTER> after each piece of input data."<<endl;
    cout<<endl;
    cout<<"Please input the beginning year of the chart (1900-2099)."<<endl;
    cin>>yearone;
    cout<<"please input the ending year of the chart (1900-2099)."<<endl;
    cin>>yeartwo;
    cout<<endl<<endl;

    if (yearone>=1900 && yeartwo<=2099)
       datavalid=true;
       else
         { cout<<"You have entered an incorrect starting and/or ending year program terminated."<<endl;
           return 1; 
         } 
   if (sunday>31)
   		month="April";
   		else
   			month="March";
   	
	count = 1;   
	maxcount = 	(yearone-yeartwo);	
 
    while (count<maxcount)
   {
   	               
    cout<<"EASTER SUNDAY CHART"<<endl;
    cout<<"-------------------"<<endl;
    
    
	
	cout<<setw(4)<<month<<setw(10)<<sunday<<endl;
	
	count++;
   }
    
    system("PAUSE");      
    return 0;
}
Topic archived. No new replies allowed.