[Help pls]

Why so big spaces?
I dont what to do right now? Its already 1 am here and hoing to school at 4am, help pls..

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  #include <iostream>
using namespace std;
int main()
{
	int x,y,s;
	for (x=0;x<=5;x++)
	{
		for(y=0;y<=5;y++)
		if (x>y)
		{
			cout<<"*";
		}
		else
		{
			cout<<"\n";
		}
		
	}
}
Why so big spaces?


Clearly what's causing the spaces is line 15: cout << "\n";

So think about where this is positioned.

In situations like these, it might be a good idea to trace your way through, and then you can see when you want to drop to the next line.
Topic archived. No new replies allowed.