Sunday 11 December 2011

Write a program to to print spaces in c

#include
#include
main()
{
int i,sp;
clrscr();
printf("Enter The Number of Spaces:");
scanf("%d",&sp);
i=0;
while(i<=sp)
{
printf(" ");
i=i+1;
}
printf("*");
getch();
}


OUTPUT
Enter The Number of Spaces: 5
*

No comments:

Post a Comment