Monday, 24 December 2012
A simple star printing program #1
Do you like this story?
That's the code for a simple star(*) printing program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
clrscr;
printf("enter how many rows:");
scanf("%d",&k);
for(i=1;i<=k;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
and the output is like:
This post was written by: Franklin Manuel
Franklin Manuel is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “A simple star printing program #1”
Post a Comment