If I wanted to adjust my code so that only integer solutions of x and i are displayed, how would I do that? For example, if x is 2 then x should be displayed along with i which is 52. However, if x is 4.3333 then I don't want to display x or i. If someone could help me out, I'd appreciate it.
as a side note, loops with a double loop variable have risks of not doing what you want. the comparisons can be tricky (esp for equality) to get right. It works, but be aware.