0

I need to verify that the number the user inputed is between 1908 and 2012. here are the actual instructions

"The constructor must also verify that the value provided for "year" is at least 1908 and at most 2012 – if not, set the year to 2010 by default"

I was think along the lines of this

```
if (y >= 1980 && y<= 2010)
{ y=year; }
if (y<1980 || y>2012)
{
y=2010;
}
```

or

```
if (y >= 1980 && y<= 2010)
{
y=year;
}
else
{
y=2010;
}
```

*Edited 6 Years Ago by Lxyslckr*: n/a