How I get 100 hz frequency in arduino mega 2560

That may be the maximum writing speed of the SD file with continuous open/close commands.

Please re-format your code for proper indentation.