Write a program to print a pattern looking at the examples given below.
All numbers will be integers (whole numbers) between 0 and 100. Sample Input The program would be run using command line parameters as shown below.
*Java:-** * java yourprogram 2 3 5 6 1
The output is shown below as it is accepted by the system.
*
xo
xox
xoxox
xoxoxo
x
*Sample Input 2 The program would be run using commandline parameters asshown below.
*Java:-** * java yourprogram 5 10 6 4 2 9
The output is shown below as it is accepted by the system.
*
xoxox
xoxoxoxoxo
xoxoxo
xoxo
xo
xoxoxoxox
*
No comments:
Post a Comment