![Aleah6645](/avatars/25935.jpg)
Aleah6645
10.03.2020 •
Computers and Technology
Assume that isIsosceles is a boolean 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.
Solved
Show answers
More tips
- F Food and Cooking How to cook crayfish? Everything you need to know...
- G Goods and services LED-подсветка в LCD-телевизорах: 5 причин, почему она лучше других технологий...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- C Computers and Internet How to Choose an Uninterruptible Power Supply (UPS) for Your Computer: Expert Tips...
- S Science and Technology How to choose a home theater system?...
- A Auto and Moto How to Choose a Car Wash? Tips and Recommendations...
- A Animals and plants How ants survive winter: exploring the secrets of their winter life...
- C Construction and repair How to Choose the Best Underfloor Heating?...
- S Sport When is the Champions League final?...
Answers on questions: Computers and Technology
- B Biology If an attic polar bear is transferred to a zoo in tropical singapore, it will not be able to survive. what could be the reason for this? tolerance only for cold climates,...
- C Chemistry Cl2 + 2 KBr = 2 KCl + Br2 reaction...
- B Business What is the technology seed? what are the main parameters of value and the functions?....
- C Chemistry Hybrid orbitals of the sp3d type occur in sets of four. true or false?...
Ответ:
if (isIsosceles){
isoCount +=1;
triangleCount +=1;
polygonCount+=1;
}
Explanation:
Using Java programming language, we have shown the full implementation.
The three variables (isoCount, triangleCount, and polygonCount) were declared and initialized to 1,2,3 respectively
After the if condition, the new values for these variables are printed to the screen and they become 2,3,4 respectively. complete code is given below
public class num3 {
public static void main(String[] args) {
boolean isIsosceles = true;
int isoCount = 1;
int triangleCount=2;
int polygonCount=3;
if (isIsosceles){
isoCount +=1;
triangleCount +=1;
polygonCount+=1;
}
System.out.println(isoCount);
System.out.println(triangleCount);
System.out.println(polygonCount);
}
}
Ответ:
why does he do it?
Explanation: