Help understanding this compilation error



#include<stdio.h> void show() { int a[100],b[100],x,y=1,z,m,k,w=0,h,i,t=1,s=0; scanf("%d",&x); for(i=0;i<x;i++) scanf("%d,%d",&a*,&b*); while( y<=x) { z=a*; while(z<=b*) {k=z; while(k!=0) { h=k/10; k=k%10; if(!(h==4)&&!(h==7)) t=0;} if(t!=0) {k=z; while(k!=0) {k=k%10; s++; } } if(s==4||s==7) w++; z++; } m=w%100000007; printf(" %d",m); y++; } }
``So I submitted this code for Lucky2 Problem but a compilation error showed up saying:

/usr/lib/gcc/i486-linux-gnu/4.8/…/…/…/i386-linux-gnu/crt1.o: In function _start': (.text+0x18): undefined reference tomain’
collect2: error: ld returned 1 exit status

Can anyone plz explain it to me…I mean what have I done wrong here?


It’s simple your code does not contain main() function.


main() Function missing
it should be
void main ()


Corrected my code…n now it says time limit exceeded,optimize it…Anywayz thank you