import java.util.Scanner;
public class JavaApplication60 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter a number in the twenties");
int num = scan.nextInt();
if(num >= 30 || num <= 19){
System.out.println("That's not in the twenties!");
num = 25;
}
System.out.println("Your number is " + num);
}
}
This is the complete code including the main class and main method. I hope this helps!
Answer:
i beleive its c
Explanation:
sorry if its wrong thats what i think it is
Answer:
see description
Explanation:
clicking in new script, we type the following:
%inputs and variables
N = input('Enter N : ');
values = input('Enter values : ');
positive=0;
negatives=0;
zero=0;
%for loop
for c = 1:N
if values(c) > 0
positive = positive + 1;
elseif values(c) < 0
negatives = negatives + 1;
else
zero = zero + 1;
end
end
positive
negatives
zero
so we basically loop the array and add one to counters each time we read an element from the input, for example if we enter:
Example input
Enter N : 5
Enter values : [1,-1,0,2,352]
positive = 3
negatives = 1
zero = 1
Answer:
Hi!
The correct answer is the a.
Explanation:
The Moore's law is an a empirical law that Gordon Moore predicted doing some observations about how the density of the transistors on a integrated circuit was increasing over time.
For example, this law state that if you have an integrated circuit with: 1000 transistors in 1980 then in 1981 and six months later you will have the same integrated circuit with 2000 transistors, and so on..
- Jan 1980: 1000 transistors.
- Jul 1981: 2000 transistors.
- Jan 1983: 4000 transistors.
- Jul 1984: 8000 transistors.
And that's the reason because its cost will fall too.
Answer:
What is the shortest sequence of MIPS instructions that extracts a field for the constant values of bits 7-21 (inclusive) from register $t0 and places it in the lower order portion of register $t3 (zero filled otherwise)? - sll$t0, $t3, 9# shift $t3 left by 9, store in $t0
srl $t0, $t0, 15# shift $t0 right by 15
Explanation:
The shortest sequence of MIPS instructions that extracts a field for the constant values of bits 7-21 (inclusive) from register $t0 and places it in the lower order portion of register $t3 (zero filled otherwise) is shown below:
sll$t0, $t3, 9# shift $t3 left by 9, store in $t0
srl $t0, $t0, 15# shift $t0 right by 15