Computer Test
Computer Test
int result = (a * b) - (c / d) + e;
7. import java.util.*;
public class Largest
{
public static void main (String[] args)
{
Scanner sc=new Scanner(System.in)
int a,b,c,largest;
System.out.println("Enter the first number:");
a = sc.nextInt();
System.out.println("Enter the second number:");
b = sc.nextInt();
System.out.println("Enter the third number:");
c = sc.nextInt();
9.
public class AccString
{
public static void main(String[]args)
int num=6;
if(num%2==0)
{
System.out.println("This num is even");
}
{
else
System.out.println("This num is odd");
}
}
10.
import java.util.Scanner;
while (true) {
int number = sc.nextInt();
if (number < 0) {
break;
}
System.out.println("Loop ended.");
}
}
}}}
16.
public class Multipli
{
public static void main(String [ ] args) {