Back

codekata  Pattern program 

Created 4 years ago
46 Views
2 Comments
KARTHIKEYAN
@KARTHIKEYAN
KARTHIKEYAN
@KARTHIKEYANProfile is locked. Login

Write a code to generate a pyramid pattern using stars from the given input size N.

#include<stdio.h>

int main()
{
int N,R=0,j=0;
scanf("%d",&N);
for(R=0;R<=N;R++)
{
for(j=0;j<R;j++)
{
printf("*");
}
printf("\n");
}
R++;
return 0;
}

Test case passed in online compiler but not in guvi ???

Comments (2)
Please login to comment.