Answer: Result:Enter the number of quarters in the jar: 4
Enter the number of dimes in the jar: 5
Enter the number of nickels in the jar: 2
Enter the number of pennies in the jar: 5
Total value is 1 dollars and 65 cents
Explanation: import java.util.Scanner;public class Coins { public static void main(String[]args) { int quarters, dimes, nickels, pennies; int total;Scanner scan = new Scanner (System.in);System.out.print("Enter the number of quarters in the jar: "); quarters = scan.nextInt();System.out.print("Enter the number of dimes in the jar: ");dimes = scan.nextInt(); System.out.print("Enter the number of nickels in the jar: ");nickels= scan.nextInt(); System.out.print("Enter the number of pennies in the jar: ");pennies = scan.nextInt(); int total_cents = 25*quarters + dimes*10 + nickels*5 + pennies;total =total_cents/100;total_cents = total_cents %100;System.out.println("Total value is " + total + " dollars and " + total_cents + " cents ");}}
Result:Enter the number of quarters in the jar: 4
Enter the number of dimes in the jar: 5
Enter the number of nickels in the jar: 2
Enter the number of pennies in the jar: 5
Total value is 1 dollars and 65 cents
Explanation:
Steps to clear CMOS using the battery method
Turn off all peripheral devices connected to the computer.
Disconnect the power cord from the AC power source.
Remove the computer cover.
Find the battery on the board. ...
Remove the battery: ...
Wait 1–5 minutes, then reconnect the battery.
Put the computer cover back on.
ARPANET would not carry it
Answer:
Time Complexity of Problem - O(n)
Explanation:
When n= 1024 time taken is t. on a particular computer.
When computer is 8 times faster in same time t , n can be equal to 8192. It means on increasing processing speed input grows linearly.
When computer is 8 times slow then with same time t , n will be 128 which is (1/8)th time 1024.
It means with increase in processing speed by x factor time taken will decrease by (1/x) factor. Or input size can be increased by x times. This signifies that time taken by program grows linearly with input size n. Therefore time complexity of problem will be O(n).
If we double the speed of original machine then we can solve problems of size 2n in time t.