1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Oksi-84 [34.3K]
3 years ago
11

Assume that isIsosceles is a bool variable, and that the variables isoCount, triangleCount, and polygonCount have all been decla

red 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.
Computers and Technology
1 answer:
Leona [35]3 years ago
6 0

Answer:

if (isIsosceles) {

 isoCount++;

 triangleCount++;

 polygonCount++;

}

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.

You might be interested in
Pls help ...
dedylja [7]

Answer:

  • You open the class, and print sleep after thread 3000
  • So A
8 0
3 years ago
The software used to help run the computer hardware is the _____.
TiliK225 [7]
C. system software
if it means drivers and so on
6 0
3 years ago
Read 2 more answers
Which of the following is an accurate explanation of what this paragraph means?
LuckyWell [14K]

Answer:

fifty five years later he burned out the same person who had to go and he said that the same person you met in a long period and I have been on my side and you know what I mean to him but she is the one I want her out and then she has a good time for me to get to the point where I don't know her I would have

4 0
3 years ago
Which animation principle is applied to ‘sell’ the beginning of the character jump?
Sunny_sXe [5.5K]
Anticipation I think so but I’m not sure:)
3 0
2 years ago
In Java, write a AllDigitsOdd program that has a method called allDigitsOdd that takes an integer and returns whether every digi
yan [13]

Answer:

Hi there! The solution for this problem can be implemented a number of ways. Please find my solution below along with the explanation.

Explanation:

The prompts are fairly easily implemented using the Scanner class in Java for user input. In the allDigitsOdd function, we can perform a Math operation on the number being passed into the function to determine the number of digits in the number. We use the log10 function to do this and convert the double value returned to int. This is calculated in the code below as:  "(int)(Math.log10(number) + 1); ". Once we have the number of digits, we write a simple loop to iterate over each digit and perform a modulus function on it to determine if the digit is odd or even. I have declared 2 variables call odd and even that get incremented if the mod function (%) returns a 1 or a 0 respectively. Finally, the result is displayed on the screen.

AllDigitsOdd.java

import java.util.Scanner;

import java.lang.Math;

public class AllDigitsOdd {

 public static void main(String args[]) {

   // print main menu for user selection

   System.out.println("Please enter a number");

   Scanner scan = new Scanner(System.in);

   int selection = scan.nextInt();

   if (allDigitsOdd(selection)) {

     System.out.println("All numbers are odd");

   } else {

     System.out.println("All numbers are not odd");

   }

 }

 public static boolean allDigitsOdd(int number) {

   int digits = (int)(Math.log10(number) + 1);

   int even = 0;

   int odd = 0;

   for (int index = 1; index <= digits; index++) {

       if ((int)(number / Math.pow(10, index - 1)) % 10 % 2 == 0) {

         even += 1;

       } else {

         odd += 1;

       }

   }

   if (even == 0 && odd > 0) {

     return true;

   } else {

     return false;

     //if (odd > 0 && even == 0) {

     //  return true;

     //}

   }

 }

}

8 0
3 years ago
Other questions:
  • true or false: for most queries, the user location changes our understanding of the query and user intent.
    13·1 answer
  • 10. Question
    15·1 answer
  • A customer in a store is purchasing 5 items. Write a python program that asks for the price of each item and display the subtota
    14·1 answer
  • A computer has the following parameters Operation Frequency Cycles Arithmetic/Logical instructions 65% 1 Register load operation
    11·1 answer
  • What do u say to your bf if he says sayy lesssss
    14·2 answers
  • Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the fo
    5·1 answer
  • The CMOS battery located on a computer's motherboard allows for maintaining the correct time and date information stored in CMOS
    7·1 answer
  • Write a function called missing_letters that takes a string parameter and returns a new string with all the letters of the alpha
    7·1 answer
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • name instances in the past where social media has kept you informed about the latest news around the country​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!