PR1 - W02 - Variables and Datatypes
PR1 - W02 - Variables and Datatypes
Tutorial 02
Activity 1: Pow Table
Write a program that displays the following table. Cast floating-point
numbers into integers.
a b pow(a, b)
1 2 1
2 3 8
3 4 81
Activity 2: Runway Length
Given an airplane’s acceleration a and take-off speed v, you can compute
the minimum runway length needed for an airplane to take off using the
following formula:
v2
length =
2𝑎
Write a program that prompts the user to enter v in meters/second (m/s)
and the acceleration a in meters/second squared (m/s2) and displays the
minimum runway length. Here is a sample run: