+ 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
+ 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
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
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
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
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
- 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
18th Aug 2019, 6:43 AM