Answer:
while (Num>=0) {
System.out.println("enter a another number");
Num = in.nextInt();
}
Explanation:
The complete java code prompting a user to enter a number until a negative number is entered is given below:
import java.util.Scanner;
public class num6 {
public static void main (String [] args) {
Scanner in = new Scanner(System.in);
System.out.println("enter a number");
int Num = in.nextInt();
while (Num>=0) {
System.out.println("enter a another number");
Num = in.nextInt();
}
System.out.println("Done.");
return;
}
}
The answers are as follows:
a) F(A, B, C) = A'B'C' + A'B'C + A'BC' + A'BC + AB'C' + AB'C + ABC' + ABC
= A'(B'C' + B'C + BC' + BC) + A((B'C' + B'C + BC' + BC)
= (A' + A)(B'C' + B'C + BC' + BC) = B'C' + B'C + BC' + BC
= B'(C' + C) + B(C' + C) = B' + B = 1
b) F(x1, x2, x3, ..., xn) = ∑mi has 2n/2 minterms with x1 and 2n/2 minterms
with x'1, which can be factored and removed as in (a). The remaining 2n1
product terms will have 2n-1/2 minterms with x2 and 2n-1/2 minterms
with x'2, which and be factored to remove x2 and x'2, continue this
process until the last term is left and xn + x'n = 1
Some examples of environmental technology is recycling.