Getting error in the same code

hi @Mihir163 you didnt write the line using namespace std; that is why so many errors were arising, also there were some other minor syntax mistakes as well which i have fixed and added comments where i encountered them. This is the modified code https://ide.codingblocks.com/s/269291
Please mark your doubt as resolved in case of no further queries.