Answer:
Logic for a program
Explanation:
//Here ind = index
//declare the number
number ind
number sum
number avg
number SIZE = 20
number num[SIZE] = {0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0}
getReady()
while ind < SIZE
getNumbers()
stop
getReady()
ind = 0
sum = 0
return
getNumbers()
cout<< “Enter a number for position ”, ind
input numbers[ind]
sum = sum + numbers[ind]
ind = ind + 1
return
;
finishUp()
avg = sum/SIZE
ind = 0
while ind < SIZE
output numbers[ind], avg – numbers[index]
ind = ind + 1
return
Modify the program in 2a
number index
number sum
number avg
number actualSize
number SIZE = 10
number number[SIZE] = 0
Answer:
1,073,741,274 KB
Explanation:
Use an unit convertor or an calculator.
Answer:
The answer to the following question is the option "b".
Explanation:
In the computer system, Hard disks stand for the hard disk drive. It is also known as a hard disk. It locates inside the computer case. The hard disk drive is used to store an electromechanical data. That uses magnetic storage device that store and retrieve data. So the answer to this question is hard disks.
Answer:
Check the explanation
Explanation:
CPI means Clock cycle per Instruction
given Clock rate 600 MHz then clock time is Cー 1.67nSec clockrate 600M
Execution time is given by following Formula.
Execution Time(CPU time) = CPI*Instruction Count * clock time = 
a)
for system A CPU time is 1.3 * 100, 000 600 106
= 216.67 micro sec.
b)
for system B CPU time is 
= 333.33 micro sec
c) Since the system B is slower than system A, So the system A executes the given program in less time
Hence take CPU execution time of system B as CPU time of System A.
therefore
216.67 micro = =
Instructions = 216.67*750/2.5
= 65001
hence 65001 instruction are needed for executing program By system B. to complete the program as fast as system A
Answer:
import java.util.Scanner;
import java.lang.*;
class Main
{
public static void main(String args[])
{
int n;
//For capturing the value of n
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the value of n:");
//The entered value is stored in the var n
n = scanner.nextInt();
int k=1;
printnum(n,k);
}
public static void printnum(int n,int k)
{
if(n%2==0)
{
for(int i=k;i<=n-1;i=i+2)
{
System.out.print(i);
}
System.out.println("");
}
else
{
for(int i=k;i<=n-1;i=i+2)
{
System.out.print(i);
}
System.out.println("");
}
n--;
if(n<=1)
{
System.exit(0);
}
else
{
printnum(n,k+1);
}
}
}
Explanation:
The program is self explanatory.