Computer Science, asked by hgusyd, 1 year ago

*
*#
*#*
*#*#
*#*#*
please do this star pattern program
it is very important ​

Answers

Answered by PrashantMishra420420
0

C pattern program of stars and alphabets:

#include<stdio.h>

int main()

{

int n, c, k, space, count = 1;

printf("Enter number of rows\n");

scanf("%d", &n);

space = n;

for (c = 1; c <= n; c++)

Answered by Anonymous
1

class pattern

{

public static void main(String args[])

{

for(int i = 1 ; i <=5 ; i++ )

{

for(int j = 1 ; j<=i; j++ )

{

if( j%2 == 1 )

System.out.print("* ");

else

System.out.print("# ");

}

System.out.println();

}

}

}


hgusyd: you are great
Anonymous: thanks .. if you post any new question , inform me .
Similar questions