Main.cc: In function ‘int main()’:
Main.cc:5:6: error: lvalue required as left operand of assignment
a%n=0;
^
Main.cc:6:18: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
printf("%d %d",a);
^
Main.cc:4:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&a);
~~~~~^~~~~~~~~~~~~~~