I did not know how to solve the issue with the reverse output with that code but I managed to use this. Also your for loop is missing an interval. Lastly you need to set start = 1 since 1 would be the first day
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int values = 0;
// display the header
cout << " Mon Tue Wen Thu Fri Sat Sun\n";
for (int start = 1; start <= 30;start++ )//set increment for days
{
cout << setw(4) << start; //setting the number of digits per value
values++; //using values as a number of days per line
if (values==7)
{
cout<<endl;//once values reach 7 for days of week
values=0; // endl and rest values to 0 to run if again
}
}
cout<<endl;
system("pause");
return 0;
}
(and i know i was aware about it starting at 0 and not including the right numbers yet, I was just focusing on the output. I can fix the other things when i write the full program. )