+ 1

Fill in the blanks to create a method that returns the minimum of the two parameters. public int minFunc(int n1, int n2

Fill in the blanks to create a method that returns the minimum of the two parameters. public int minFunc(int n1, int n2 { int min; if (n1 > n2) min = ; min = n1; min; }

22nd Mar 2017, 10:34 AM
Hashim Abdullah
Hashim Abdullah - avatar
9 ответов
+ 4
public int minFunc(int n1, int n2) { int min; if (n1 > n2) min = n2; else min = n1; return min; }
26th Jun 2019, 6:07 PM
Israel Cohen
Israel Cohen - avatar
0
public int minFunc(int n1, int n2) { int min; if (n1 > n2) min = n2; else min = n1; return min; }
15th Oct 2020, 10:09 AM
Surya Charan
Surya Charan - avatar
0
public int minFunc(int n1, int n2 ) { int min; if (n1 > n2) min = n2 ; else min = n1; return min; }
19th Jul 2022, 2:32 PM
Prajjwal Gurav
Prajjwal Gurav - avatar
0
import java.util.Scanner; //your code goes here public class Program { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); System.out.print(Converter.toBinary(x)); } } public class Converter { public static String toBinary (int x){ String binary=""; while (x>0){ binary= (x%2)+binary; x = x/2; } return binary; } }
28th Oct 2022, 12:33 PM
URWISH JADAV
URWISH JADAV - avatar
0
Fill in the blank to define a method that does not return a value. public calc()
3rd Apr 2023, 7:59 PM
Evans Obodai
Evans Obodai - avatar
- 2
public int minFunc(int n1,int n2 ;){ int min; if(n1>n2) min=n2; else min=n1; return min; }
7th Dec 2018, 1:44 PM
Sagar Pundlik Balpande
Sagar Pundlik Balpande - avatar
18th Aug 2019, 6:43 AM
A BASKAR
A BASKAR - avatar
- 3
public int minFunc(int n1,int n2){ int min; if(n1>n2) min=n2; else min=n1; return min; }
28th Apr 2017, 8:55 AM
Gamer
Gamer - avatar
- 3
public int minFunc(int n1, int n2) { int min; if (n1 > n2) min =n2; else min = n1; return min; }
7th Jun 2017, 7:19 AM
Appu. C
Appu. C - avatar