Results 1 to 8 of 8
Thread: Some exercises
 12022009, 12:20 AM #1Member
 Join Date
 Oct 2009
 Posts
 7
 Rep Power
 0
Some exercises
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 = 1574228: 15742 modulo 97 = 28 correct
Code = 722705: 72270 modulo 97 = 5 correct
Code = 2261010: 22610 modulo 97 = 9 incorrect
Code = 505370: 50537 modulo 97 = 0 incorrect
Code = 5053797 : 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.

What do we win if we are tops in the contest?

 12022009, 12:25 AM #4Member
 Join Date
 Oct 2009
 Posts
 7
 Rep Power
 0
:) you are right, I am actually trying, but I just need a push, at least with one of them resolved...

Well regardless, I wish you much luck.
 12022009, 12:36 AM #6Member
 Join Date
 Oct 2009
 Posts
 7
 Rep Power
 0
Thank you...this is for a job :)
 ... this is for a job...
Again, much luck!
 12022009, 01:00 AM #8Member
 Join Date
 Oct 2009
 Posts
 7
 Rep Power
 0
oh, no i am not actually cheating, these were given as samples to work on and practise, and i am actually working in parallel now in solving them, and doing my researches...i just needed a push as i said, at least in one complete exercise, because I have the logic, only few difficulties in syntaxes...still i am googling them and learning but since i dont have much time, I am working on different levels...:)
Similar Threads

Exercises
By lclclc in forum New To JavaReplies: 3Last Post: 09142009, 10:20 PM
Bookmarks