Ask Question
30 April, 22:56

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.

+3
Answers (1)
  1. 1 May, 01:39
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers