for(int i = 1; i <= days; i++)
for(int days = i; days < 7; days++)
cout << setw(5) << i;
cout << "\n";
I'm having trouble getting the underlined portion set up. It's supposed to start on whatever numbered day that is input by the user. Also, no matter how many days in the month I put the program still counts to 31?
It's when you start mixing formatted and unformatted extractions that headaches arise.
The OPs code has a few problems, but that isn't one of 'em.
OP, you have 5 variables delcared in your code. One of them you never use. 2 of them have the same name as 2 other variables.
The inner for loop updates your outer for loop's counter, which may or may not be what you want. The inner for loop can't ever execute more than once because you set the variable days to the outer loop's counter i. i is always >= 7 after the first iteration of the outer loop.