1. Write a Java program that takes in an integer n as input (use the
Input class) and prints the letter "V" using asterisks whose "height"
is
n. For example, if n is 4, the output should be as follows:
* *
* *
* *
*
2. Write a Java applet (use InputOutputApplet) with inputs (integers)
a
and b and whose output are all pairs (x,y) of positive integers such
that
x < a, y < a, and x + y = b. For example, if a = 8, and b = 10, you
should print all (ordered) pairs of integers (from 1, 2, 3, 4, 5, 6,
7)
whose sum is 10:
3, 7
4, 6
5, 5
6, 4
7, 3