This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Introduction to C++ Homework Problem Set 5 Project by Dillon Morse | |
* ------------------------------------------------------------------ | |
* Create a sequential file that contains 34 rows and 34 columns. Fill the | |
* array with random numbers between -20 and 80. Your main code will ask the | |
* user to enter a number N between -20 and 80. Yoiu will open the file and | |
* search the two dimension array you read in for the number N. If found, | |
* display the number of times it was found. Next, pass your two dimension | |
* array to a functoin called diagonal. The function will ask the user if they | |
* want the sum of the main diagonal values to a function called diagonal. The | |
* function will ask the user if they want the sum of the main diagonal values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <regex> | |
#include <cstdlib> | |
using namespace std; | |
double* getInput(); | |
bool undefined(double*); | |
double a(double*); | |
double c(double*, double); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Introduction to C++ Project 2 by Dillon Morse | |
* ============================================= | |
* | |
* Description | |
* ----------- | |
* Spec out how you will code and test the definition and use of a right | |
* triangle class. | |
* 1. Determine what your data will be. | |
* 2. Create prototypes of the following functions: | |
* - Constructor(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BANG !!! | |
AND THEY'RE OFF !!!!! | |
H==T================================================================= | |
T = Tortoise | |
H = Hare | |
B = Both | |
=H==T================================================================ | |
T = Tortoise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<enemy> | |
<behaviour> | |
<root x="110" y="40"> | |
<normal> | |
<andblock> | |
<string id="Comment">Avoid Earthquake</string> | |
<normal> | |
<condition id="isOnGround"> | |
<string id="condition" values="yesno">yes</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def soundex(name): | |
code = { | |
'b': '1', | |
'f': '1', | |
'p': '1', | |
'v': '1', | |
'c': '2', | |
'g': '2', | |
'j': '2', | |
'k': '2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
struct node { | |
struct node *parent; | |
struct node *left; | |
struct node *right; | |
int value; | |
int weight; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
method FastExp(a: int, n: nat) returns (z: int) | |
ensures z == Exp(a, n) | |
{ | |
var b: int, i: nat; | |
z, b, i := 1, a, n; | |
while (i != 0) | |
invariant ExpInv(z, b, i, a, n) | |
decreases i | |
{ | |
if i % 2 == 1 { |
OlderNewer