my question is can you please translate this code into MIPSlanguage
import java.util.Scanner;
public class PrimeNumber {
public static void main(String args[]) {
int temp;
boolean isPrime = true;
Scanner input = new Scanner(System.in);
System.out.println(“Enter a number:”);
// capture the input in an integer
int num = input.nextInt();
input.close();
for (int i = 2; i <= num / 2; i++) {
temp = num % i;
if (temp == 0) {
isPrime = false;
break;
}
}
// If isPrime is true then the number is prime else not
if (isPrime)
System.out.println(num + ” is a Prime Number”);
else
System.out.println(num + ” is not a Prime Number”);
}
}
Output:
Enter a number:
8
8 is not a Prime Number
ineed imediately
Expert Answer
Answer to my question is can you please translate this code into MIPS language import java.util.Scanner; public class PrimeNumber …