Search This Blog

Tuesday, 9 April 2019

How To Print Your Name N Number Times in C Programming

Code for "PRINT YOUR NAME N NUMBER OF TIMES" Program in C language

Hey guys welcome back, hope you are enjoying other blogs,so in this Tutorial i am explaining how
to to print Your name For N number of times,where n means the size you will give at the starting.

C program to print a string: it can be printed by using various functions such as printf, puts. A string ends with '\0', it is a character used to mark end of a string. See the following code:

For example if you give your size as 5,then it will print your Name 5 Times.

#include<stdio.h>                    //header file
void main()
int n,i;                                      //variable declaration
printf(" \n HOW MANY TIMES TO PRINT ");
scanf(" %d ", &n);

for(i=0;i<n;i++)                      //For Loop For the size of n 
    printf("\n ENTER YOUR NAME");


No comments:

Post a Comment