Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class borys {
- public static void main(String[] args) {
- char [][] wynikwielo;
- wynikwielo = znakiwielo(6, 4);
- for(int i = 0; i < wynikwielo.length; i++) {
- for (int j = 0; j < wynikwielo[i].length; j++) {
- System.out.println(wynikwielo[i][j] + " ");
- }
- System.out.println();
- }
- //printwielo(wynikwielo);
- }
- public static char[][] znakiwielo(int m, int n){
- char [][] tabwielo;
- tabwielo = new char [m][n];
- char min = 'a';
- char max = 'z';
- for(int i = 0;i<m;i++){
- for(int j = 0;j<n;j++){
- tabwielo[i][j] =(char) ((Math.random() * (max - min)) + min);
- }
- }
- return (tabwielo);
- }
- public static void printwielo(char [][] b){
- for(int i = 0;i<b.length;i++){
- for(int j = 0; i<b[i].length;j++){
- System.out.print(b[i][j] + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement