Output:

Enter Element Name: Hydrogen

Hydrogen is a non-metal

Why isn't this done in a brute force method? You have your current table of 118 elements so you could make 118 if statements?

What is stopping you?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.