Answer to Question #221027 in Java | JSP | JSF for Priyanjali

Question #221027
The manager has decided to provide the party to their employees in the restaurant at week end due to his wedding anniversary. He wants to know the number of participants to arrange a dinner. During the dinner, he wants to conduct a game by calling employees who are having similar name. Design a java program to Read the list of employee names using an array. Arrange in N rows, M columns seating arrangements. Find the similar names without considering the alphabet case.
1
Expert's answer
2021-07-29T03:13:26-0400
import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
	    int M,N;
	    Scanner in=new Scanner(System.in);
	    M=in.nextInt();
	    N=in.nextInt();
	    int[][] arr = new int[M][N];
	    
		for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++) {
                arr[i][j]=in.nextInt();
            }
	    }
	    for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++) {
                System.out.print(arr[i][j] + " ");
            }
            System.out.println();
	    }
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS