Answer:
Output:-
Enter the five digit lottery number
Enter the digit 1 : 23
Enter the digit 2 : 44
Enter the digit 3 : 43
Enter the digit 4 : 66
Enter the digit 5 : 33
YOU LOSS!!
Computer Generated Lottery Number :
|12|38|47|48|49|
Lottery Number Of user:
|23|33|43|44|66|
Number Of digit matched: 0
Code:-
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class Lottery {
int[] lotteryNumbers = new int[5];
public int[] getLotteryNumbers() {
return lotteryNumbers;
}
Lottery() {
Random randomVal = new Random();
for (int i = 0; i < lotteryNumbers.length; i++) {
lotteryNumbers[i] = randomVal.nextInt((50 - 1) + 1);
}
}
int compare(int[] personLottery) {
int count = 0;
Arrays.sort(lotteryNumbers);
Arrays.sort(personLottery);
for (int i = 0; i < lotteryNumbers.length; i++) {
if (lotteryNumbers[i] == personLottery[i]) {
count++;
}
}
return count;
}
public static void main(String[] args) {
int[] personLotteryNum = new int[5];
int matchNum;
Lottery lnum = new Lottery();
Scanner input = new Scanner(System.in);
System.out.println("Enten the five digit lottery number");
for (int i = 0; i < personLotteryNum.length; i++) {
System.out.println("Enter the digit " + (i + 1) + " :");
personLotteryNum[i] = input.nextInt();
}
matchNum = lnum.compare(personLotteryNum);
if (matchNum == 5)
System.out.println("YOU WIN!!");
else
System.out.println("YOU LOSS!!");
System.out.println("Computer Generated Lottery Number :");
System.out.print("|");
for (int i = 0; i < lnum.getLotteryNumbers().length; i++) {
System.out.print(lnum.getLotteryNumbers()[i] + "|");
}
System.out.println("\n\nLottery Number Of user:");
System.out.print("|");
for (int i = 0; i < personLotteryNum.length; i++) {
System.out.print(personLotteryNum[i] + "|");
}
System.out.println();
System.out.println("Number Of digit matched: " + matchNum);
}
}
Explanation:
Answer:
Safety check is defined as rounding to make sure that the patients and the milieu (patients living quarters) is secured and free of harmful items that can be used to hurt someone.
B. isolation joints
C. control joints
D. construction joints
If you are pouring a large concrete slab and wish to avoid random cracks caused by shrinkage, you would likely provide Control joints. The correct answer would be C.
Control joints are used to prevent random cracks from forming in large concrete slabs caused by shrinkage. These joints are placed at strategic locations in the slab to allow for the concrete to expand and contract without cracking. Expansion joints, on the other hand, are used to separate concrete from other structures or materials, and isolation joints are used to separate different sections of concrete.
Construction joints are used to connect two different pours of concrete. Therefore, the best option for preventing random cracks caused by shrinkage would be to use control joints.
Learn more about Control joints:
#SPJ11
again = "false";
result = 0;
a. choice
b. again
c. result
d. none of these are Boolean variables
Answer:
C
Explanation:
Boolean Algebra deals with either a one or a zero and how to manipulate them in computers or elsewhere. The "choice" option may not work, since for text it must be enclosed in quotation marks, usually. For "again," it's text and not a 1 or 0. So, the answer is C, since this is a 0.
Answer:
3 m/s²
Explanation:
Acceleration is calculated as :
a= Δv/ t
where ;
Δv = change in velocity
Δv = 45 - 0 = 45 m/s
t= 15 s
a= 45 /15
a= 3 m/s²
Answer:
an attachment is below
Explanation:
1) the formula for damping coefficient id for RLC series circuit.
For \xi =0 you can make c=0 but inductor will still have some capacitance.
2) the responses of critically damped system and under damped system are shown with comments on their time response.
4) There can be many different answers to this question, but the 4 I have mentioned are the most important parameters we need to know about an unknown op-amp if we are to use it in our circuit.
Hope it answers all your questions.
Answer:
PART A
Design guidelines are sets of procedures to be followed in order to enhance the designing of an object or other things.
Design Performance is the actual process of carrying out the design process of an object using the design guidelines or criteria.
PART B
(1) Design guidelines tools helps to enhance design Performance.
(2) Design guidelines tools helps the designing performance tools to be effective.
Explanation:Design guidelines are the various steps which has special tools used to guide the designer in order to enhance the designing performance tools and ensure that the design process is done devoid of errors.
Design Performance tools are tools which helps to enhance the actual design Activities.