cout not working
I'm making a program to print out dates between 10/8/10 and 1/14/11 because I'm lazy. This code compiles but when I run it, it does noting.
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
|
#include <iostream>
#include <string>
using namespace std;
int main() {
int month = 10;
int day = 8;
int year = 10;
while (year < 10) {
cout << month << "/" << day << "/" << year <<endl;
if (day == 31 && month == 10) {
day = 1;
month = 11;
}
if (day == 30 && month == 11) {
day = 1;
month = 12;
}
if (day == 31 && month == 12) {
day = 1;
month = 1;
year = 11;
}
if (day == 14 && month == 1) {
break;
}
}
}
|
Can someone tell me what I'm missing?
1 2 3
|
int year = 10;
while (year < 10)
|
See it?
SHIT! haha I thought I had that as 13. Thanks!
Topic archived. No new replies allowed.