Ask Question
28 September, 07:08

Assume that a bool variable isquadrilateral has been declared, and that an int variable, numberofsides has been declared and initialized. write a statement that assigns the value of isquadrilateral to true if numberofsides is exactly 4 and false otherwise.

+2
Answers (1)
  1. 28 September, 09:14
    0
    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;
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume that a bool variable isquadrilateral has been declared, and that an int variable, numberofsides has been declared and initialized. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers