Questions
Blurred Sequence Jojo as a treasure hunter has finally found the ancient treasure box. The treasure...

Blurred Sequence

Jojo as a treasure hunter has finally found the ancient treasure box. The treasure box has three layers of lock. Each layer of lock contains clues to unlock the lock.

The first layer of lock gives a sequence of numbers. But as we know that the treasure box is as old as the dinosaurs, the sequence is blurred as it goes to the end. Jojo can only read the first seven numbers of the sequence which is: 1 , 1 , 2 , 3 , 5 , 8 , 13, ... and the rest are blurred.

After a days of researching, Jojo found out that the sequence is a fibonacci sequence which each number is the sum of the two preceding ones. Formally, fibonacci sequence are written as Fi as the i-th fibonacci number and its property is Fi = Fi-1 + Fi-2 where i > 2 and in this case, the base cases are F1 = 1 and F2 = 1.

And it’s not even the riddle yet. The lock gives Jojo two numbers L and R and asks Jojo to get the sum of its digits from L-th fibonacci to R-th fibonacci inclusive. As a good friend of Jojo, help Jojo to solve the first layer lock riddle.

Format Input:

There are T testcases. Each testcase contains two integers L and R which indicates the numbers that the lock gives.

Format Output:

Output T line with format “Case # X: ”, where X indicates the testcase number and then followed by the answer of the riddle.

Constraints

• 1 ≤ T ≤ 100

• 1 ≤ L ≤ R ≤ 64

Sample Input (standard input):

5

1 4

3 5

6 7

9 9

3 11

Sample Output (standard output):

Case #1: 7

Case #2: 10

Case #3: 12

Case #4: 7

Case #5: 59

NOTE: USE C LANGUAGE, DONT USE FUNCTION(RESULT,RETURN),VOID,RECURSIVE, USE BASIC CODE AND CODE IT UNDER int main (){, constraint must be the same

In: Computer Science

Part 1: netstat Run the 'netstat' command and review the output. Note that the first part...

Part 1: netstat
Run the 'netstat' command and review the output. Note that the first part
of the output is a list of active Internet connections, and the second part
is a list of active sockets. The format of each part is different (i.e. different
number of columns per line, and different column headers).

1.  Write a bash command line that will display the number of active Internet
    connections as reported by 'netstat'.  Your output should be a single number.

2.  Write a bash command line that will display the number of active Internet
    connections with non-zero 'Send-Q' values, as reported by 'netstat'.  Your
    output should be a single number.

3.  Write a bash command line that will display the TOTAL of all 'Send-Q' values 
    for all active Internet connections reported by 'netstat'.  In other words, 
    calculate and display the numeric total of the 'Send-Q' column of the 'netstat'
    output. Your output should be a single number.

4.  Is the 'Foreign Address' reported by 'netstat' an internal or external address?
    Explain why.

5.  Write a bash command line that will display the 'I-Node' and 'State' values
    for all active UNIX domain sockets whose State is "CONNECTED" and whose "Path"
    value is empty (i.e. all spaces)

6.  Write a bash command line that will display the 'Type' and 'I-Node' values for
    all active UNIX domain sockets whose 'RefCnt' value is greater than 2.

Part 2: hostname
Review the 'man' documentation for 'hostname'.  

7.  Execute a 'hostname -i' command.  
    Is the IP address displayed by 'hostname' an internal or an external address?  
    Explay why.

Part 3: ping
Review the 'man' documetation for 'ping'.  
Execute a 'ping www.pcc.edu' command and review the output.

8.  Is the IP address shown for www.pcc.edu an internal or an external IP address?
    Explain why.

9.  Write a bash command line that will ping 'www.pcc.edu' 10 times, and then display
    the average ping time in milliseconds. Your output should be a single number.

In: Computer Science

Three persons, A, B, and C, take turns in throwing a die. They throw in the...

Three persons, A, B, and C, take turns in throwing a die. They throw in the order A, B, C, A, B, C, A, B, etc., until someone wins. A wins by throwing a "one". B wins by throwing a "one" or a "two". C wins by throwing a "one", a "two", or a "three". Find the probability that each of the players is the winner.

In: Statistics and Probability

Problem 12-4 Last year (2016), Pronghorn Condos installed a mechanized elevator for its tenants. The owner...

Problem 12-4 Last year (2016), Pronghorn Condos installed a mechanized elevator for its tenants. The owner of the company, Ron Richter, recently returned from an industry equipment exhibition where he watched a computerized elevator demonstrated. He was impressed with the elevator's speed, comfort of ride, and cost efficiency. Upon returning from the exhibition, he asked his purchasing agent to collect price and operating cost data on the new elevator. In addition, he asked the company’s accountant to provide him with cost data on the company’s elevator. This information is presented below. Old Elevator New Elevator Purchase price $104,500 $161,000 Estimated salvage value 0 0 Estimated useful life 5 years 4 years Depreciation method Straight-line Straight-line Annual operating costs other than depreciation: Variable $35,600 $11,000 Fixed 23,200 9,000 Annual revenues are $239,000, and selling and administrative expenses are $29,000, regardless of which elevator is used. If the old elevator is replaced now, at the beginning of 2017, Pronghorn Condos will be able to sell it for $24,700. Determine any gain or loss if the old elevator is replaced. $ Link to Text Prepare a 4-year summarized income statement for each of the following assumptions: (1) The old elevator is retained. Retain Old Elevator Revenues $ Less costs: Variable costs $ Fixed costs Selling & administrative Depreciation Net income $ (2) The old elevator is replaced. Replace Old Elevator Revenues $ Less costs: Variable costs $ Fixed costs Selling & administrative Depreciation Operating income Less: Loss on old elevator Net income $ Link to Text Using incremental analysis, determine if the old elevator should be replaced. (Enter negative amounts using either a negative sign preceding the number e.g. -45 or parentheses e.g. (45).) Retain Old Elevator Replace Old Elevator Net Income Increase (Decrease) Variable operating costs $ $ $ Fixed operating costs New elevator cost Salvage on old elevator Totals $ $ $

In: Accounting

A cylinder containing ideal gas is sealed by a piston that is above the gas. The...

A cylinder containing ideal gas is sealed by a piston that is above the gas. The piston is a cylindrical object, with a weight of 36.0 N, which can slide up or down in the cylinder without friction. The inner radius of the cylinder, and the radius of the piston, is 7.00 cm. The top of the piston is exposed to the atmosphere, and the atmospheric pressure is 101.3 kPa. The cylinder has a height of 30.0 cm, and, when the temperature of the gas is 20°C, the bottom of the piston is 14.0 cm above the bottom of the cylinder. (a) Determine the pressure of the gas in the cylinder. kPa (b) Find the number of moles of ideal gas in the cylinder. moles (c) Heat is added, gradually raising the temperature of the gas to 165°C. Calculate the distance between the bottom of the cylinder and the bottom of the piston when the piston comes to its new equilibrium position.

In: Physics

At the beginning of last year (2019), Richter Condos installed a mechanized elevator for its tenants....

At the beginning of last year (2019), Richter Condos installed a mechanized elevator for its tenants. The owner of the company, Ron Richter, recently returned from an industry equipment exhibition where he watched a computerized elevator demonstrated. He was impressed with the elevator's speed, comfort of ride, and cost efficiency. Upon returning from the exhibition, he asked his purchasing agent to collect price and operating cost data on the new elevator. In addition, he asked the company’s accountant to provide him with cost data on the company’s elevator. This information is presented below.
Old Elevator New Elevator
Purchase price $103,500 $161,000
Estimated salvage value 0 0
Estimated useful life 5 years 4 years
Depreciation method Straight-line Straight-line
Annual operating costs
other than depreciation:
   Variable $34,600 $10,000
   Fixed 23,600 8,800

Annual revenues are $239,000, and selling and administrative expenses are $29,000, regardless of which elevator is used. If the old elevator is replaced now, at the beginning of 2020, Richter Condos will be able to sell it for $24,400.
Determine any gain or loss if the old elevator is replaced.

Loss on saleGain on sale

$
Prepare a 4-year summarized income statement for each of the following assumptions:

(1) The old elevator is retained.
Retain Old Elevator
Revenues $
Less costs:
   Variable costs $
   Fixed costs
   Selling & administrative
   Depreciation
Net income $

(2) The old elevator is replaced.
Replace Old Elevator
Revenues $
Less costs:
   Variable costs $
   Fixed costs
   Selling & administrative
   Depreciation
Operating income
Loss on old elevator
Net income $
Using incremental analysis, determine if the old elevator should be replaced. (In the first two columns, enter costs and expenses as positive amounts, and any amounts received as negative amounts. In the third column, enter net income increases as positive amounts and decreases as negative amounts. Enter negative amounts using either a negative sign preceding the number e.g. -15 or parentheses e.g. (15).)
Retain
Old Elevator
Replace
Old Elevator
Net Income
Increase
(Decrease)
Variable operating costs $ $ $
Fixed operating costs
New elevator cost
Salvage on old elevator
   Totals $ $ $


The old elevator

shouldshould not

be replaced.

In: Accounting

Two baseball teams play a best-of-seven series, in which the series ends as soon as one...

Two baseball teams play a best-of-seven series, in which the series ends as soon as one team wins four games. The first two games are to be played on A’s field, the next three games on B’s field, and the last two on A’s field. The probability that A wins a game is 0:7 at home and 0:5 away. Assume that the results of the games are independent. Find the probability that:

(a) A wins the series in 4 games; in 5 games;

(b) the series does not go to 6 games.

In: Statistics and Probability

(3) In the game of Chuck-a-luck, a player places a $1 bet on a number from...

(3) In the game of Chuck-a-luck, a player places a $1 bet on a number from 1 to 6. Three dice are then rolled. The player wins $1 for each die with the number they bet upon on it.

a. Construct the probability distribution that includes all four events in this game.

b. What is the expected value of this game?

c. Instead of $1, how much should be charged to make this a fair game?

In: Statistics and Probability

Five people on the basement of a building get on an elevator that stops at seven...

Five people on the basement of a building get on an elevator that stops at seven floors. Assuming that each has an equal probability of going to any floor, find

(a) the probability that they all get off at different floors

(b) the probability that two people get off at the same floor and all others get off at different floors.

In: Math

A risk-neutral plaintiff in a lawsuit is deciding whether to settle a claim or go to...

A risk-neutral plaintiff in a lawsuit is deciding whether to settle a claim or go to trial. The defendants have offered a $150,000 settlement. If the plaintiff does not settle, she believes that the probability of winning at trial is 75%. If the plaintiff wins, she is awarded X dollars. If she loses her payoff is $0. How large must X be in order for the plaintiff to turn down the settlement offer? Suppose instead that the plaintiff is risk-averse, with a utility function of U(w)=sqrt(w). If the plaintiff does not settle she believes that the probability of winning at trial is 75%. If she wins she is awarded X dollars. If she loses her payoff is $0. How large must X be in order for the plaintiff to turn down the settlement offer? Is this number smaller or larger than that in part a)? Why?

In: Economics