Answer:
import java.util.Scanner;
public class DashLine {
public static void main(String[] args) {
// Declaring variables
int n;
/*
* Creating an Scanner class object which is used to get the inputs
* entered by the user
*/
Scanner sc = new Scanner(System.in);
// Getting the input entered by the user
System.out.print("Enter a number :");
n = sc.nextInt();
// calling the method by passing the user entered input as argument
dashedLine(n);
}
//This method will print the dashed line for number greater than zer
private static void dashedLine(int n) {
if (n > 0) {
for (int i = 1; i <= n; i++) {
System.out.print("-");
}
System.out.println();
}
}
}
Explanation:
What are the answer choices?
Answer:
The four-step process of fetch, decode, execute, and store. Type of memory where the contents of this are not erased when the computer is turned off.
Answer:
The answer of the following question is Brute force attack
.
Explanation:
A brute force attack is the error and trial method that is used by an application program to decode the encrypted data like passwords or the Data Encryption Standard (DES) keys, which through an exhaustive effort (by using brute force) rather than the employing an intellectual strategies.
Answer:
Initially if x = a = 2437 and y = 875, condition (1) that is x>y is true and output would be x = 1562 with y = 87
Explanation:
According to pseudo code the code will run until x becomes equal to y. Initially if x = a = 2437 and y = 875, condition (1) that is x>y is true. So next step would be x=x-y and output would be x = 1562 with y = 875. With initial values x = a = 2437 and y = 875, x becomes equal to y after 21 iterations and output is x=y=1
X Y
- 2437 875
- 1562 875
- 687 875
- 687 188
- 499 188
- 311 188
- 123 188
- 123 65
- 58 65
- 58 7
- 51 7
- 44 7
- 37 7
- 30 7
- 23 7
- 16 7
- 9 7
- 2 7
- 2 5
- 2 3
- 2 1
- 1 1