I want to take these as input
3
abc def
deg fgh
ghdfete fdgtr dhjgg
The output should be
abc def
deg fgh
ghdfete fdgtr dhjgg
The code that I have written
#include <stdio.h>
int main(){
int t;
scanf("%d",&t);
char a[100];
while(scanf("%[^\n]%*c",a) == 1){
printf("%s\n",a);
--t;
if(t == 0)
break;
}
return 0;
}
isn't printing anything. Please help.