Monday, 24 December 2012

A simple star printing program #2

That's the code for another simple star(*)  printing program:


#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,l;
clrscr;
printf("enter how many rows:");
scanf("%d",&k);
for(i=1;i<=k;i++)
{
for(l=1;l<=k-i;l++)
{
printf(" ");
}
for(j=1;j<=i;j++)
{
printf("* ");
}
printf("\n");
}
getch();
} 

and the output is like:



1 Responses to “A simple star printing program #2”

Anonymous said...
14 January 2022 at 19:51

Lucky 7 - Sega Genesis | Konicasino rb88 rb88 188bet 188bet 카지노사이트 카지노사이트 카지노 카지노 カジノ シークレット カジノ シークレット 251 Spades Tournament Rules | Player Profile - FFBasino


Post a Comment

Recent Comments

All Rights Reserved Assignments on C language