2 3
4 5 6
7 8 9 10
please help me

Are you short of words or expressions or you can't type or the keyboard is not working or just not having enough time to properly ask your doubt's :icon_exclaim::icon_exclaim:

And you are thinking that we are having a lot of spare time to not only solve and answer your questions but also to understand the what you are asking for....

This is just not done...right ????

int main() {
  printf("1\n2 3\n4 5 6\n7 8 9 10\nplease help me\n";

People around here get very angry when people start threads with posts like that. Try to be more expressive and also a little more polite (otherwise it can get a little nasty). People are happy to help but they don't want to feel used and abused. It is a great forum and some people really know their stuff. Plus we do want help but not fully do your homework, with no input or effort on your behalf.

On this occasion here is the solution to your problem.

#include <stdio.h>

int main() {

	int num = 1, lineCount, i;
	for(lineCount = 1; lineCount <= 4; lineCount++) {
                for(i = 0; i < lineCount; i++) {
			printf("%d ", num++);
	return 0;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.