Output rectangles one per line with the format x1 y1
x
x2 y2.
THIS SI FINAL DISPLAY OF AN ARRAY {[ 1, 1 ], [ 3, 3 ]} Level is : 0 Position is : 0 {[ 2, 2 ], [ 4, 4 ]} Level is : 1 Position is : 0
(cerr)
.
.cc
files.
#include "my-list.cc"
The road to wisdom?
Well it's plain and simple to express:
err and err and err again
but less and less and less.---- Piet Hein
Date: 14 Dec 2001 13:41:19 -0500 From: "R. Clayton" <rclayton@monmouth.edu> To: s0------@monmouth.edu Subject: Re: assignment 7 Since these are the final days of the semester, every deadline seems to come together at once. Could we have an extension for the final assignment for CS-509. Sorry, no deadline extensions.
Date: 29 Oct 2001 11:29:37 -0500 From: "R. Clayton" <rclayton@monmouth.edu> To: s0------@monmouth.edu Subject: Assignment deadline. I've had a report, a project, a mid-term test and your assignment due this week. Can I get an extension on the assignment? No, sorry - no extensions.
Date: 6 Mar 2003 16:36:14 -0500 From: "R. Clayton"To: s0------@monmouth.edu Subject: Deadline extension Is it possible to postpone the project due date by a couple of days? All the school labs are closed from Friday 5 pm to Monday morning, and some of us don't have computers at home. Because you've been working on this project for the past three and a half weeks, I'm disinclined to extend the deadline. What you've accomplished up to this point should be more than enough to do well in the project; the bells and whistles you could add in the remaining days, although they may be interesting, are probably not important in meeting the project's requirements.
void eat_white() { while (cin && isspace(cin.peek())) cin.ignore(); } void f() { while(cin && (cin.peek() != EOF)) { cin >> s; eat_white(); } }
$ program < /dev/null
$ program < program
// main function int main() { count = 0; // make counter to zero // Break the loop if temp_sum >= sum_of_vec while (temp_sum < sum_of_vec) {
// Find the largest sub-sum less than the total. while (temp_sum < sum_of_vec) {
// Represent expressions as binary trees.
// Insert the constant value n into the tree.
unsigned check(unsigned n) { ... }
Check what? For what? And then what?
// Function to check if the number is Prime unsigned IsPrime(unsigned Pnum) { ... }
O.k., check if (I guess) Pnum
is prime. Then what?
We're not playing 20 questions; we're communicating.
bool IsPrime(unsigned n) { // Return true iff n is prime. }
char *temp = new char[5]; strcpy(temp,"<FONT"); char *temp2 = new char[5];
bool readInst(List *L, char *&inst, int noInst) { char * line = new char[80]; inst = new char[80]; strcpy(inst, "\0"); line = L->getNext(); if ( line == NULL ) inst = NULL; return false; }
main()
is not freeing storage.
void main() { LList list; cout << "Please enter a sequence of sets of " << "algebraic eq. (ctrl+d) to end" << endl; int setCount = readInput(list); printResults(list, setCount); }
or
ceiling((42 - 30)/5)
= 3 points off.
bool alpha_test(vector < string > vect) if (vect[0] == "move") if (vect[1] == "r0" || vect[1] == "r1" || vect[1] == "r2" || vect[1] == "r3" || vect[1] == "r4" || vect[1] == "r5" || vect[1] == "r6" || vect[1] == "r7") { if (vect[2] == " r0" || vect[2] == "r1" || vect[2] == " r2" || vect[2] == "r3" || vect[2] == "r4"||vect[2] == "r5" || vect[2] == "r6" || vect[2] == "r7") { } if (vect[2] == "r0" || vect[2] == "r1" || vect[2] == "r2" || vect[2] == "r3" || vect[2] == "r4" || vect[2] == "r5" || vect[2] == "r6" || vect[2] == "r7" ) { } bool move_test(vector < string > vect ) if (vect[0]!="move") for (unsigned int k = 1; k < vect.size();k++) if (vect[k] == "r0" || vect[k] == "r1" || vect[k] == "r2" || vect[k] == "r3" || vect[k] == "r4" || vect[k] == "r5" || vect[k] == "r6" || vect[k] == "r7") { }
int ans = check(s.substr(i,j-i)); if (ans == 1) { /* whatever */ } else if (ans == 2) { /* whatever */ } else if (ans == 3) { /* whatever */ } else if (ans == 4) { /* whatever */ } else if (ans == 5) { /* whatever */ } else if (ans == 6) { /* whatever */ } else if (ans == 0) return false;
char ch[200] while cin.getline(ch, 200, '\n') ... f(200) ...
Have you changed all proper values?
Have you left alone all other values?
#define INVALID 0 #define NUMBER 1 #define VARIABLE 2 #define OPERATOR 3 #define LB 4 #define RB 5 #define EQUAL 6 if (StBlk[row][0].Type() != VARIABLE) /*...*/ if (StBlk[row][col].Type() == INVALID) /*...*/ if ((StBlk[row][col].Type() == NUMBER || StBlk[row][col].Type() == VARIABLE) && (StBlk[row][col+1].Type() == LB)) /*...*/ if (StBlk[row][col].Type() == EQUAL) /*...*/ if (StBlk[row][1] .Type() != EQUAL) /*...*/
const int INVALID = 0, NUMBER = 1, VARIABLE = 2, OPERATOR = 3, LB = 4, RB = 5, EQUAL = 6;
system()
.
system()
will be broken for testing.
A[-1]
is never correct.
A[4294967295]
.
This page last modified on 4 September 2003.