170k views
4 votes
Assume that isIsosceles is a bool variable, and that the variables isoCount, triangleCount, and polygonCount have all been declared and initialized. Write a statement that adds 1 to each of these count variables (isoCount, triangleCount, and polygonCount) if isIsosceles is true.

Please help me complete this. I have been struggling for quite some time and need help with a explanation. But mainly I need the answer. Thank you.

User ZackDeRose
by
4.9k points

1 Answer

1 vote

Answer:

if (isIsosceles) {

isoCount++;

triangleCount++;

polygonCount++;

}

Step-by-step explanation:

The above will work in C/C++/Java/JavaScript, but you didn't specify which language you need. Anyway the principle stays the same.

User Light Yagmi
by
5.2k points