Computer Science, asked by rachanashah34, 7 months ago

write a qbasic program to display the following pattern

Attachments:

Answers

Answered by freedarajesh2003
0

Answer:

Explanation:

MORE PROGRAM RELATED TO NUMERIC PATTERN USING SUB PROCEDURE (CLICK HERE). Series. WAP to display the series 2 3 5 8 12

Answered by sonprodigal
0

Explanation:

#include<stdio.h>

#define MAX 5

int main()

{

int i,j;

int space=4;

/*run loop (parent loop) till number of rows*/

for(i=0;i< MAX;i++)

{

/*loop for initially space, before star printing*/

for(j=0;j< space;j++)

{

printf(" ");

}

for(j=0;j<=i;j++)

{

printf("* ");

}

printf("\n");

space--;

}

/*repeat it again*/

space=0;

/*run loop (parent loop) till number of rows*/

for(i=MAX;i>0;i--)

{

/*loop for initially space, before star printing*/

for(j=0;j< space;j++)

{

printf(" ");

}

for(j=0;j< i;j++)

{

printf("* ");

}

printf("\n");

space++;

}

return 0;

}

\huge{ son \: prodigal}

Similar questions