#include<stdio.h>
int main()
{
int n, i, j, k, l;
i = l = 0;
char ch[100], an[1000000];
printf("Enter A String and Number : ");
scanf("%s %d", &ch, &n);
while(ch[i] != '\0')
{
i++;
}
for(k=1; k<=n; k++)
{
for(j=0; j<i; j++)
{
an[l] = ch[j];
l++;
}
}
an[l] = '\0';
printf("\n%s\n", an);
return 0;
}
int main()
{
int n, i, j, k, l;
i = l = 0;
char ch[100], an[1000000];
printf("Enter A String and Number : ");
scanf("%s %d", &ch, &n);
while(ch[i] != '\0')
{
i++;
}
for(k=1; k<=n; k++)
{
for(j=0; j<i; j++)
{
an[l] = ch[j];
l++;
}
}
an[l] = '\0';
printf("\n%s\n", an);
return 0;
}
Comments
Post a Comment