Cody

Problem 44370. Octoberfest festival

Created by Andriy Kavetsky in Community

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more, after one more half-hour they ordered two more beers like sum of previous two times. Then after having spend a good time and anoter half an hour they ordered three beers. The situation went on. Task: calculate how many beers they ordered after n half-hours for given n - number of half-hours.

Example:

n=1 result will be 2;

n=2 result will be 4.

Solution Stats

37.63% Correct | 62.37% Incorrect
Last solution submitted on Feb 14, 2019

Problem Comments

Solution Comments

Recent Solvers267

Suggested Problems

More from this Author37

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!