%{
#include<stdio.h>
int n;
%}
%%
[0-9]+
{
n=atoi(yytext);
printf("Multiplication Table of %d is: \n",n);
for(int i=1;i<=10;i++)
{
printf("%d X %d = %d\n",n,i,n*i);
}
}
. { printf
("Invalid Input
! Please Enter a
number: "
);} %%
int main()
{
yylex();
return 0;
}
int yywrap()
{
return 1;
}
JXsKICAgICNpbmNsdWRlPHN0ZGlvLmg+CiAgICBpbnQgbjsKJX0KCiUlCgpbMC05XSsgCnsKICBuPWF0b2koeXl0ZXh0KTsKICBwcmludGYoIk11bHRpcGxpY2F0aW9uIFRhYmxlIG9mICVkIGlzOiBcbiIsbik7CiAgZm9yKGludCBpPTE7aTw9MTA7aSsrKQogIHsKICAgIHByaW50ZigiJWQgWCAlZCA9ICVkXG4iLG4saSxuKmkpOwogIH0KfQoKLiB7IHByaW50ZigiSW52YWxpZCBJbnB1dCEgUGxlYXNlIEVudGVyIGEgbnVtYmVyOiAiKTt9CiUlCgppbnQgbWFpbigpCnsKICBwcmludGYoIkVudGVyIHRoZSBudW1iZXI6ICIpOwogIHl5bGV4KCk7CiAgcmV0dXJuIDA7Cn0KaW50IHl5d3JhcCgpCnsKICAgIHJldHVybiAxOwp9