cin and cout replaced by scanf and printf