That would be a bit hard, because there's an error in almost every line.
To sum it up: use the correct names of the headers (cstdio, iostream, etc.), do not use C strings, do not use gets, do not use non-standard functions, use proper indentation.
After you've fixed that, we can get to the actual logic problem (if it still exists after the fixes).