When I give the first input, an extra 0 appears before gets()
works. But if I remove gets()
, then there is no problem. printf()
can't be used because it breaks on blank space. Please give any alternative solution or what should I do?
#include <cstdio>
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
long long a,i,t,count;
int op;
char s[10000];
scanf("%lld",&t);
for(i=1;i<=t;i++)
{
gets(s);
a=atoll(&s[7]);
printf("%lld",a);
}
return 0;
}