Getting rid of scanf and printf