Java exercises I had to do for my Java classes. The source of the exercises are unknown, although most of them can be found here: http://www.jkozak.pl/przedmioty-ue/programowanie-java/ The author of this site is probably also the author of the tasks.
- Celsius to Fahrenheit conversion
- Read 3 numbers from input and output the biggest and the smallest
- Rate body mass with BMI
- Count the tax
- Count the installment plan
- Simple calculator
- Get an unsigned integer and output all of the uneven numbers below it
- Read a and b from input and output sum from a, a+1...b using while, do while and for
- Read an unsigned integer and write all of the powers of two below the number
- Read numbers from input until 0 and print out a sum of them
- Read numbers from input until 0 and print the biggest, the smallest and an average of these
- Game 'too high, too low'. Guess the number
- Read x, y, a, b, c where (x,y) is the position of the corner of a rectangle with size of (a,b) filled with c character
- Read an integer x from input and output a spruce with x levels
- Read an integer and print out sum of the digits and an average of them
- Print divisors of an integer
- Check if a number is prime
- Generate a random array and print the biggest, the smallest element, the average etc.
- Generate a random array with numbers from range 1-10 and count the occurences
- Create a matrix with random integers and print the biggest and the smallest numbers from the columns
- Print a number in binary with a negative sign
- Print a matrix with print numbers (see description)
- See description
- Read a string from input and write out number of repetition of the last character
- Reverse given string
- Check if given string is a palindrome
- Sum digits found in given string
- Check if the parentheses in given string are well constructed
- Encrypt given string with Caesar Cipher
- Write iterative and recursive versions of factorial
- Write iterative and recursive versions of fibonacci
- Method returning position of given character in string
- Flip case of a string - make lowercase uppercase and vice versa
- Method checking if given string starts with second string
- Convert string to integer (see description).
- Same as Ex. 3 but with given string
- Count words in given string
- Split a string by whitespace
- Count occurences of a string in given string
- Cut a part of string and return the result
- See description
- Change character order with given integer array
- Check if a string is an anagram of another
- Convert hex to RGB array
- Count words, characters and whitespaces in given file
- Print lines to a file which contains given term
- See description
- Encrypt and decrypt a file with caesar cipher
- See description
- Convert text table to HTML table
- Create a chart of letter frequency from a file
- Print 10 numbers to a file, reverse them and read them.
- PGM grid generator
See description