Friday, 30 May 2014

Write a program to display your name upto 10 times using while loop.

#include<stdio.h>

main()
{
    int i=1;
    char name[100];
    printf("\nEnter your name=");
    gets(name);
    while(i<=10)
    {
        printf("\n%s",name);
        i++;
    }
}

No comments:

Post a Comment