Hoping for gud answers:)
Please do not answer if you do not know..
Answers
hi
here's the correct answer
Programming using C, loops jini
/*
C program to print number pattern
*/
#include <stdio.h>
int main()
{
int i, j, N;
printf("Enter N: ");
scanf("%d", &N);
for(i=1; i<=N; i++)
{
// Logic to print spaces
for(j=1; j<=N-i; j++)
{
printf(" ");
}
// Logic to print numbers
for(j=1; j<=i; j++)
{
printf("%d", j);
}
printf("\n");
}
return 0;
The step-by-step descriptive logic to print spaces is:
To print spaces, run an inner loop from 1 to N - i. Inside this loop print single blank space.
output
enter N=5
1
21
321
4321
5321
hope it helps
plz mark me brainliest
Answer:
1
12
123
1234
12345
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,row;
clrscr();
printf("\nHow many rows\n");
scanf("%d",&row);
for(i=1;i<=row;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}