Answer :
You should state the language you're using in these types of questions; here's an example in C++.
bool isQuad;
int sides;
std::cout << "How many sides does the shape have?";
std::cin >> sides;
if (sides == 4)
isQuad = true;
else
isQuad = false;
bool isQuad;
int sides;
std::cout << "How many sides does the shape have?";
std::cin >> sides;
if (sides == 4)
isQuad = true;
else
isQuad = false;