C program sentence copy maker

#include<stdio.h>
int main(){
char *word[40];
int op;
printf("welcome to copy making\n");
printf("enter the word to print many times\n>>");
scanf("%[^\n]s",word);
printf("how many times do you want to print\n>>");
scanf("%d",&op);
for(int i =1;i <=op; i++){
printf("%s\n",word);
}
main();
}

Comments

Post a Comment

Popular posts from this blog

Snake game.c

Type declaration

Array with function