Name: ____________________________________________________ Alpha: _____________________
Describe help received: _________________________________________________________________
What confuses me: Key points:
struct Point {
double x, y;
};
struct Trial {
double stime, etime;
Point *ways;
int numways;
};
struct Subject {
string name;
int id;
Trial pre, post;
};
Subject S;
Subject* A;
int i, j;
| expression | type |
S.id | |
A[i] | |
A.pre.ways[i][j] | |
S.post = A[i].pre; | |
A[i].post.ways | |
S.pre.ways[i] | |
A[i].id = S.ways[i].y | |
A[i].pre.ways[j].x | |
A[i].post.ways.x | |
S.pre.numways++ |
raffle.cpp that simulates a raffle lottery. Your
program will
~/$ ./raffle How many people? 3 Person 1 name: Dave Person 1 tickets: 650 205 592 377 Person 2 name: Erin Person 2 tickets: 324 980 769 230 Person 3 name: Jim Person 3 tickets: 442 230 296 230 Winning ticket: 592 Dave won! ~/$ ./raffle How many people? 2 Person 1 name: Erin Person 1 tickets: 324 980 769 230 Person 2 name: Jim Person 2 tickets: 442 230 296 230 Winning ticket: 592 ~/$ ./raffle How many people? 2 Person 1 name: Erin Person 1 tickets: 324 980 769 230 Person 2 name: Jim Person 2 tickets: 442 230 296 230 Winning ticket: 230 Erin won! Jim won!Turn In a screen capture of your program running on the above input, and a printout of your source code.