Pattern Codes, ABCDE Code, Arduino Code

Friday, 13 January 2017

Right Angle Star pattern in c

Right angle Star Pattern in C

Output:

 enter the number of your choice 5
*
**
***
****
*****
******

Code:
#include<stdio.h>

int main()
 {
int i,j,n;
printf("\n enter the number of your choice");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
for(j=0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
return 0;
}

No comments :

Post a Comment

Rolls Royce

Rolls Royce
Amazing Cars

About Me