Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
classwork
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("enter number of rows and colums"); int r=sc.nextInt(); int c=sc.nextInt(); int arr[][]=new int[r][c]; int i,j,s=0,h=0; System.out.println("enter the numbers"); for(i=0; i<r; i++) { for(j=0; j<c; j++) { arr[i][j]=sc.nextInt(); } } int f=0; for(i=0; i<r; i++) { s=0; for(j=0; j<c; j++) { s+=arr[i][j]; } if(s>h) { h=s; f=i; } } for( j=0; j<c; j++) { System.out.print(arr[f][j]+" "); } } }
run
|
edit
|
history
|
help
0
3e
Implement Queue with Limited Size of Arrays
LRU cache - Using doubly linked list (Fast!)
Instance fields are no overridden
Cola Machine
Problem: on_off
// Java Coding Challenge - 08: Reversing a Number using StringBuilder
++a vs a++ and calculations around different variables
piglatin
Coding Numbers - Polindrome