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
bazaltina [42]
3 years ago
13

Wap in java to complete the following (16*1) +(14*2) +(12*3) +(10*4) +(8*5) +(6*6) +(4*7)​

Computers and Technology
1 answer:
vladimir1956 [14]3 years ago
3 0

Answer:

It goes like:

public class Program

{

public static void main(String[] args)

{

int j=18;

int sum=0;

for (int i =1; i<7; i++)

{

sum=sum+(i*(j-2));

j=j-2;

}

System.out.println(sum);

}

}

Explanation:

<u>Variables used: </u>

j : controls the first number in product and decreases by 2 each time the loop runs.

sum: saves the values of addition as the loop runs.

You might be interested in
Can you help me with these AP Computer Science Questions. (THIS IS DUE BY 1:30 PM today) you have to evaluate the Boolean Expres
vfiekz [6]

Answer + Explanation:

'and' -> both statements are 'True' to evaluate as 'True'.

'or' -> at least one statement is 'True' to evaluate as 'True'.

1. True (grade has the value of 82, so the statement evaluates to 'True').

2. True (Both statements are true, this expression evaluates to 'True').

3. False (Both statements are false, this expression evaluates to 'False').

4. True (the != operator means <em>not equal.</em> Since the 'name' variable holds the string 'Rumpelstiltskin', name != 'Rumpelstiltskin' evaluates to 'False'. The 'not' operator returns the opposite of the given Boolean expression, so this expression evaluates to 'True').

5. True (name == 'Rumpelstiltskin' evaluates to 'True', so this expression is true).

6. False (All statements evaluate to 'False').

7. True (All statements evaluate to 'True').

8. False (All statements evaluate to 'True' except for <em>not(x == - 3) </em>which evaluates to 'False', so the whole statement now becomes false).

9. True (<em>grade+5 < 90 and grade >= 80 </em>evaluates to 'True', so this whole expression becomes true).

10. True (<em>grade > 0 and x % 2 == 1 </em>evaluates to 'True')

Hope this helps :)

7 0
3 years ago
1 Which one of the following is a transmission
ElenaW [278]

Answer:

d

Explanation:

All of the above can be means by which signals or information is transferred.

5 0
2 years ago
What is a secondary storage medium that uses magnetic techniques to store and retrieve data on disks or tapes coated with magnet
Elza [17]

Answer:

The correct answer to the following question will be "Magnetic medium".

Explanation:

Some storage device that portrays details or information using magnetic patterns is called a magnetic device.

  • Magnetic tape, and hard drives are the commonly used magnetic storage devices.
  • This will be the method by which magnetic methods are used to hold and retrieve information on tapes.

So, it's the right answer.

3 0
3 years ago
Which is a possible benefit of having a good credit history?
Solnce55 [7]

I believe low interest rate is the correct answer

6 0
3 years ago
Read 2 more answers
In a computer instant messaging​ survey, respondents were asked to choose the most fun way to​ flirt, and it found that ​P(D)equ
MA_775_DIABLO [31]

Answer:

P(D) = 0.4

Explanation:

P(D) is the probability of randomly selecting someone.

who does not choose a direct​ in-person encounter as the most fun way to flirt.

1 – 0.600 = 0.4

P(D) = 0.4

hence the upper D over bar right parenthesis represent and its value is 0.4

8 0
3 years ago
Other questions:
  • Manuel is working on a project in Visual Studio. He wants to keep this program showing on the entire desktop, but he also needs
    7·1 answer
  • This library function returns a random floating point number within a specified range of values. The function returns a random f
    12·1 answer
  • An IT firm came across a startup company that offers a new system of computer storage. It is currently in the experimental phase
    11·1 answer
  • 2. Given the following list, write a snippet of code that would print the individual elements of the list using the indexes of t
    13·1 answer
  • The text between and defines the _____.
    15·1 answer
  • _____________________________________________________is a pre-designed format to help users with the creation of a document, lik
    6·1 answer
  • 13. Place where names, addresses and email information<br> is stored
    6·1 answer
  • Which statement correctly differentiates how to use list and table styles?
    12·2 answers
  • 56- What is the term used when you press and hold the left mouse key and more the mouse
    8·1 answer
  • What is the digital revolution and how did it change society?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!