A sixth grade class conducted a survey. They asked 40 of their friends how many of them had a pet. The survey showed that 18 of their friends had pets. What percent of their friends has a pet?