Pages

Sunday, 20 May 2012

program to to print a star by define spaces enter b user


67./*Write a program to to print a star by define spaces enter b user.*/

#include<stdio.h>
#include<conio.h>
main()
{
int i,sp;
clrscr();
printf("Enter Number of Spaces:-");
scanf("%d",&sp);
for(i=1;i<=sp;i++)
printf(" ");
printf("*");
getch();
}
 Enter Number of spaces:- 10

No comments:

Post a Comment