C11 Solutions 1. Count := 1; FOR I in 1 . 10 LOOP If I MOD 2 = 0 THEN
FOR J in 1 . 10 LOOP
Count:= Count + 2;
END LOOP;
ELSE
FOR J in 1 . 5 LOOP
Count := Count 1;
END LOOP;
END IF;
END LOOP;
Count = 76. Count increments by 20 when I is even and
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
Physics Department
Physics 8.286: The Early Universe
October 27, 2013
Prof. Alan Guth
QUIZ 1 SOLUTIONS
Quiz Date: October 3, 2013
PROBLEM 1: DID YOU DO THE READING? (25 points)
(a) (5 points)
The diagram was used to e
UNIFIED ENGINEERING
Fall 2003
I. Kristina Lundqvist
Problem C14. (Unified Computers and programming)
1. Design an Ada95 package to:
a. Accept 9 integers and store them in a 1-dimensional array
b. Display the unsorted array as a 3x3 matrix assuming:
i. Dat
APPROXIMATE VALUES OF USEFUL CONSTANTS
Constant
c (speed of light)
G (gravitation constant)
k (Boltzmanns constant)
h (Plancks constant)
mproton
eV (electron Volt)
M (solar mass)
L (solar luminosity)
R (solar radius)
(Stefan-Boltzmann cons)
(Angstrom)
A
k
UNIFIED ENGINEERING
Fall 2003
I. Kristina Lundqvist
Problem C11. (Unified Computers and programming)
1. What is the output of the code fragment in Figure 1?
2. Write an Ada95 program to implement the Eulers 2nd order integration method.
Turn in a hard cop
8.286 QUIZ 1, FALL 2013
p. 2
PROBLEM 1: DID YOU DO THE READING? (25 points)
(a) (5 points)
Weinberg used the diagram above to explain an important property of the
Hubble expansion law. What property was it. Explain in one or a few sentences
how this diagr
C8-1
Algorithm
1. Use a subtype to represent the numbers for months
2. Use an enumeration to represent the named months
3. Use an enumeration to represent the roman months
4. Get the inputs from the user
5. Convert the month into roman and named formats u
UNIFIED ENGINEERING
Fall 2003
Ian A. Waitz
Problem T10 (Unified Thermodynamics)
An aircraft is flying at M=2.0 at 11km (Tatm = 217K, patm = 22.6kPa, = 1.4). (LO# 4)
a) In the reference frame of the airplane, what are the static and stagnation (or total)
t
C-14 Solutions
1.
Package Design
Data Structures
An array of nine integers
Subprograms
Function to accept 9 integers
Procedure to display the array in row major order
Procedure to display the array in column major order
Procedure to sort the array using t
Problem 1 (25 points)
Orbital Dynamics
It has long been suspected that there is a massive black hole near the center of our Galaxy.
Recently, a group of astronmcrs determined the parameters of a star that is orbiting the
suspected black hole. The orbital