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
Amanda [17]
3 years ago
6

(a) Rewrite the following using if else statement:

Computers and Technology
1 answer:
Yakvenalex [24]3 years ago
5 0

Answer:

int x;

String s;

if ((x%3) == 0) {

   s = "Divisible by 3";

} else {

  s = "Not divisible by 3";

}

System.out.println(s);​

Explanation:

A : B ? C generally translates to if (A) { B } else { C }.

Note the == to compare to 0. The single = in the original expression is a mistake.

You might be interested in
(a)Ms word is a isa word processing software ,(b)hub provides physical connection between all computers, State true or false​
8090 [49]

Answer:

true

Explanation:

true in answer in the question

8 0
3 years ago
Read 2 more answers
Can anybody answer this for me
zhenek [66]

Answer:

0 times because front is not clear

6 0
4 years ago
Read 2 more answers
How do networks help protect data? -by preventing access by more than one person at a time -by restricting access to department
Whitepunk [10]

Answer:

because they have to rest

3 0
3 years ago
Read 2 more answers
)Dynamically allocate an object of Banana, using the pointer variable daco.
zepelin [54]

Answer:

d) daco = new Banana;

Explanation:

Dynamically allocated variables have their memory allocated in the heap memory.We declare a dynamical variable like this:-

int *a=new int ;

It means a pointer a is created on the stack memory which hold the address of the block that hold the value of variable a in heap memory.

We already have the pointer daco. We just have to initialize with keyword new.

It will be like daco=new Banana; which matches the option d.

5 0
3 years ago
2.Use loops to create a 4X6 matrix in which the value of each element is two times its row number minus three times its column n
DiKsa [7]

Answer:

for(i=0; i<4; i++)

{

      for(j=0;j<6;j++)

      {

               A[ i ][ j ] = 2* i - 3*j;

      }

}

Explanation:

In this loop for each i = 0,1,2,3 we fill the the corresponding column values. and then move to next i value i.e. row.

3 0
3 years ago
Other questions:
  • Which are characteristics of pseudocode? Select all that apply.
    6·1 answer
  • A web __________, such as internet explorer or mozillaâs firefox, allow users to access the world wide web.
    10·1 answer
  • What did I do wrong? May you please correct it for me...I was also looking on how to delay when it prints. Like when it prints a
    9·1 answer
  • Complete the sentence.
    8·1 answer
  • How does a modem work​
    13·1 answer
  • ¿Es lo mismo hablar de tecnología que de computadora?
    12·1 answer
  • How to change the microsoft word pages to black background
    8·1 answer
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
  • . When you ____________________ a word, you can use a single line, a double lines, a dotted line, or even a wavy line!
    6·1 answer
  • How should excel Identify social security numbers: as a text, numbers, or date and time? Why?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!