Hi, I am new in this PSPad forum and I have some homework assignments. Well
basically they are easy, but difficult for me. I hope someone in this forum
could help me to complete these tasks. 

All upcoming tasks must be completed using Java. I have to test them by pressing
Start button and then typing cmd in and then trying them out.(Start - cmd - cd
java - javac File-name.java - java File-name)

I tried to translate these tasks myself from my native language, so there might
be some mistakes in it.

1. Write a dice program:
The program will throw 2 dice. First 2 will go for the player and other two for
computer. Then computer will show results, add them and tell who won.

2. Using cycles do following:
1) Write numbers from 10 to 1.(with spaces between)
1 2 3 4 5 6 7 8 9 10
2) Write even numbers to 30
2,4,6,8,10,12...,30
3) Write odd numbers from 9 to 0, but they must have that many spaces between as
the previous number.
9         7       5     3   1
4) Create a table, which looks like this:
 
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 0
2 3 4 5 6 7 8 9 0 1
3 4 5 6 7 8 9 0 1 2
4 5 6 7 8 9 0 1 2 3
5 6 7 8 9 0 1 2 3 4
6 7 8 9 0 1 2 3 4 5
7 8 9 0 1 2 3 4 5 6
8 9 0 1 2 3 4 5 6 7
9 0 1 2 3 4 5 6 7 8

3. Write a Cum-Laude detector for an university
This program receives 2 arguments. Average grade and the final test grade. If
the average is higher than 4,5 and final test is 5, then it says "Yes",
otherwise "No"
NB! Program should not accept not normal grades (such as negative or over 5 and
so on). If its not normal it says "Error"

4. Write a game of heads and tails
Program asks player heads or tails. Player then guesses one and program
"throws". Then it says if the player guesses correctly.

5. Write a program about choosing one.
Program asks a number. Then it chooses one number from 0 to that given number.
NB! Check if it works. If 3 is given then it must give eventually 1, 2 and 3.

6. Write a program which throws 7 dice and sums up their score.
NB! Sum up must be done with a cycle.
Tip: To count in the cycle you should first make the number 0 and then start
adding the dice results to it. (sum = sum + ...)

-- 
<http://forum.pspad.com/read.php?2,57326,57326>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem