It depends on the problem. If you are solving a conplex one or simple
This is a java program with a class called Sum1.
Explanation:
While loop is used to add 10 number.
import java.util.Scanner;
public class Sum 1
{
public static void main(String args[])
{
int number, count, sum = 0;
Scanner s = new Scanner(System.in);
System.out.print("Enter the number:");
number = s.nextInt();
while(number > 0)
{
count = number % 10;
sum = sum + n;
number = number / 10;
}
System.out.println("Sum of Digits:"+sum);
}
}
Answer:
2^32 times as many values can be represented
Explanation:
32-bit. This means that the number is represented by 32 separate one’s and zero’s. 32 bits of 2 possible states = 2^32=4,294,967,296 possible values.
Integer meaning that only whole multiples of one are accepted.
Signed meaning that negative values are accepted. This halves the number of possible positive values (roughly), so the largest number you can represent is 2^31–1=2,147,483,647, but instead of 0, the smallest number you can represent is -2,147,483,648. An unsigned 32-bit integer, by contrast, can represent anything from 0 to 4,294,967,295.
Answer:
3% inflation rise. No correct cpi option
Explanation:
Consumer Price Index(CPI) is calculated by the Bureau of Economic Analysis and Statistics of a country monthly and annually.
Consumer Price Index(CPI) is used for measuring the changes in the price level of consumer goods and services purchased by households.
Calculating the consumer price index; price in 1964= $1.25, today price= $5.0.
Therefore, consumer price index= Price in today- price in 1964÷ price in 1964,.
Consumer Price index(CPI)= $(5-1.25)/1.25 = 3.75/1.25 = 3 Percent price inflation rise.
For the first cpi; 112-80/80= 0.4 percent( not equal to the 3 Percent inflation rise).
For the second cpi: 141.6-60/60= 1.36 Percent inflation rise(not equal to the 3 Percent inflation rise).
For the third CPI: 126.4-75/75 =0.68 percent inflation rise[not equal to the 3 Percent inflation rise].
For the third CPI: 108.5-90/90=0.21 percent inflation rise(not equal to 3 Percent inflation rise)
Therefore, none of the options are right.