Originally Posted by

**javaamateur** Could you guys help me resolve the following exercises or some of them at least? I need them in order to succeed in a contest and get more into Java.

We are asked to solve them using Java.

Exercise1

Write a program that verifies the validity of a series of codes saved in the file

code.txt. This code has three parts: a number of count, a separator ".' and a

number of control. The cod"e is correct if:

-the remainder of the number of count divided by 97 is different from

zero and equal to the number of control.

-the remainder of the number of count divided by 97 is zero and the

number of control is 97. (

Example:

Code = 15742-28: 15742 modulo 97 = 28 correct

Code = 72270-5: 72270 modulo 97 = 5 correct

Code = 22610-10: 22610 modulo 97 = 9 incorrect

Code = 50537-0: 50537 modulo 97 = 0 incorrect

Code = 50537-97 : 50537 modulo 97 = 0 correct

Use the function/Method CODE_TEST with two input parameters (number of

count and number of control) from the file code.txt to display the message, if

the code is correct or incorrect.

Exercise2

Write a program that generates 100 random i'1teger vaiues. The program

counts the number of values that fall within one of 10 Categories (1..10,

11..20, 21..30, .., 91..100). The result is graphically displayed sideways on the

screen.

Example of a result:

CatOl: *******

Cat02: *********

CatO3: *****

CatO4:****************** .

CatO5:********************

CatO6:***********

CatO7:**********

CatO8:************

CatO9:******

CatlO:***

Exercise3 .

Write a program that read the 'lector T of dimension N = 50. Fill the vector .

from the keyboard. .

Order inverse the elements of the vector T without u sing anew vector and

output the result.

."

."

Exercise4

Write a program to find, in a matrix A, the elements that are at the same time

the maximum in their line and the minimum in their column. Display the values

and the positions of these elements.

Your help will be appreciated, thank you.