Simple hcf problem

http://ide.codingblocks.com/#/s/18277
what changes should be made to this?
Its giving runtime error