Answer to Question #319654 in C++ for Sami

Question #319654

Write a C program which will print the pattern on monitor , the integer N will be taken from key board



1


12


123


1234


12345


_____


_____


12345____n


1
Expert's answer
2022-03-28T11:00:38-0400




#include <stdio.h>
#include <stdlib.h>


int main(){
	int i,j;
	int number;
	printf("Enter number: ");
	scanf("%d",&number);


	for (i = 1; i <= 10; i++) {
		for (j = 1; j <= i; j++) {
			printf("%d",j);
		}
		printf("\n");
	}
	getchar();
	getchar();
	return 0;
}



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog