Question: import java.util.Scanner; public class question2{ public static void main(String[] args){ Scanner in = new Scanner(System.in); System.out.println(Enter a number: ); boolean input = fizzBuzz(24); System.out.print(input); }

 import java.util.Scanner; public class question2{ public static void main(String[] args){ Scanner

import java.util.Scanner;

public class question2{

public static void main(String[] args){

Scanner in = new Scanner(System.in);

System.out.println("Enter a number: ");

boolean input = fizzBuzz(24);

System.out.print(input);

}

public static boolean fizzBuzz(int input){

if(input%3 == 0 && input%8 == 0)

{

return true;

}

else

{

return false;

}

}

}

import java.util.Scanner;

public class question3{

public static void main(String[] args){

int first = 0;

int second = 0;

Scanner in = new Scanner(System.in);

System.out.println(" Enter two numbers");

first = in.nextInt();

second = in.nextInt();

order(first,second);

}

public static void order(int first, int second){

if(first

System.out.println(" the numbers " + first + " and " + second + " are in correct order");

System.exit(0);

}

else{

int temp;

temp = first;

first = second;

second = temp;

System.out.println(" The numbers were not in ascending order and hence have been swapped ");

System.out.println(" first" + first + "second " + second);

System.exit(0);

}

}

}

I have done 2 and 3.

just need question4.

250 he nert heighest int. Eg 7 87 Should retun &.Use rath, ns tilen v meststs public static int myceil dutble imputy f your student rurntes orntosya ell method tnat takes in a douide and retuns an it Tre etures velue Stras e argument is divisible by both 3 an &. Return lse otewie public static boolean fizzeiul int tnputy 3.Write a void method tat accepts ints s amumersoe mwn s a single intl s an argument and returts tue tte Your method first determines that the argunents aveinfbe oreti lt si they are not (pint mesang letin h e public static void order (int first, int conp 4. WIrite a main method totest the metos a. Modify the main metholdto coletiyn Bonus: Modify the void method tocll he bolen method deme between low and high that are divisibe by and Bard rit tephe When that comple and runs propery p a s nt w the Lab TA your final workn progam andyour l set an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!