Computer Science, asked by ritiprashanth, 6 months ago

write a computer program to display the following pattern. 1 2 3 4 5. 6 7 8 9. ​

Answers

Answered by Anonymous
1

Answer:

def abc():

      print("1 2 3 4 5. 6 7 8 9.)

abc()

Answered by tabbsumk54
1

Answer:

#include<stdio.h>

#include<conio.h>

int main()

{

int i, j, k, count=1;

//for loop for all the rows=4

for(i=1;i<=4;i++)

{

//add left space for pattern

for(j=1;j<=4-i;j++)

{

printf("*");

}

//add element after space

for(k=1;k<=i;k++)

{

printf(" %d",count);

count++;

}

printf("\n");

}

}

Similar questions