This is the CPU (central processing unit)
Hope this helps, should be the answer.
Answer:
Check the explanation
Explanation:
Here the data type we are making use of is int. Now when this function is being called for finding factorial of 13 or numbers that are greater than 13 then the function is expected to shows error and the desired result will not be produced.
Reason for this problem is-- range of int dat type is -2,147,483,648 to 2,147,483,647 . Now factorial of 12 is 47,90,01,600 which is less than 2,147,483,647 . But factorial of 13 is 6,22,70,20,800 which is greater than 2,147,483,647 which means int data type can not hold such large variable. That’s why it will not give desired result for value of n greater than 12.
Now you might just want to ask that what will function do in that case – the afct ins that different languages do different things in case of overflows. Some languages just say that data type can not handle . take for instance, when it comes to java warning about overflow is not there. And during overflow there it will show negative numbers.
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class num1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter length of the array:");
int len = in.nextInt();
double [] temps = new double[len];
double avgTem;
int k =0;
double total = 0;
for( k=0; k<temps.length; k++){
System.out.println("Enter values for the array");
temps[k]=in.nextDouble();
}
System.out.println("The Arrays contains the following values");
System.out.println(Arrays.toString(temps));
// Computing the average of the values
for(k=0; k<temps.length; k++){
total = total+temps[k];
}
avgTem = total/(temps.length);
System.out.println("The average Temperature is: "+avgTem);
}
}
Explanation:
- Using Java programming language
- Import the Scanner class to receive user input
- Prompt User for the length of the Array, receive and store in a variable len;
- Declare a new double array of size len double [] temps = new double[len];
- Using a for loop, continually prompt user to enter values into the array
- Display the values of the array using Java's Arrays.toString method
- Use another for loop to add up all the elements in the arraay and store in the variable called total
- Outside the second for loop calculate the average avgTem = total/(temps.length);
- Display the average temp.
Answer:
False
Explanation:
When searching on the internet, I found flashcards containing this information.