Two - { int p = v1 * v2;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Two { public static void main(String[]args) { int val = 8; int val2 = 7; sum(val,val2); product(val,val2); cube(val); } public static void sum(int v1, int v2) { int s = v1 + v2; System.out.println("The sum is = " + s); } public static void product(int v1, int v2)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { int p = v1 * v2; System.out.println("The product is = " + p); } public static void cube(int v1) { int c = v1 * v1 * v1; System.out.println("The cube is = " + c); }}...
View Full Document

Ask a homework question - tutors are online