answersLogoWhite

0

How do you write x multipled by y in Java?

Updated: 8/16/2019
User Avatar

Wiki User

16y ago

Best Answer

double result = x * y;

or if you are really strange:

double result = 0;

for (int k = 0; k < y; k++)

{

result += x;

}

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write x multipled by y in Java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to write an if then statement in java?

&lt;if_stmt&gt; --&gt; if(&lt;expr&gt;) {&lt;stmt&gt;} else [&lt;stmt&gt;] for example if(x&gt;y){ max=x; }else [optionally] { max=y; }


What points equal y equals 5x?

y = 5x is the equation of a line. Subtitute any value for "x", then calculate the corresponding value of "y", which in this case is simply the value of "x" multipled by 5.


How do you write the sum of x and y?

X+y


How can you write quotient of x and y?

x/y


How do you write an equation that shows y is a function of x?

The normal way of showing that y is a function of x is to write y = f(x).


What is another way to write 15 x x y expression?

another way to write 15 x x y = 15x2y


Write the rule in algebraic form?

you write it like this (x,y) ----&gt; (-x+4, y-5)


How do you make a program that will take the value of x and y and the output must show in what quadrant does the point exists?

Basically you write a series of if statements, to cover the different cases. For example, in Java, something like this:...if (x = 0)System.out.println("On y-axis")else if (y = 0)System.out.println("On x-axis")else if (x > 0)if (y > 0)System.out.println("First quadrant")else...


How do you use coordinated in a scentece?

To write "it's x-coordinate is x and it's y-coordinate is y", you just write "It's coordinates are (x,y)".


Write the equation of the boundary for y x - 1?

y&gt;x-1


How do you write a verbal expression for x over y?

X divided by Y


How do you write a pseudocode program for finding out x to the power of y?

X**y