In this, we are going to see for loop, the program is based on for loop which basically, prints any character/symbol N times with the help of the C Programming language.Â
#include <stdio.h>
int main()
{
int i, n;
char c;
printf("Enter any character:-\n");
scanf(" %c", &c);
printf("Enter no. of times the character should repeat\n");
scanf("%d", &n);
for (i = 0; i < n; i++)
{
printf("%c\n", c);
}
return 0;
}
//......Coded by YASH ALAPURIA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP