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> | |
using namespace std; | |
int main () { | |
//declare variables | |
const int maxTemp = 70; //maximum allowed temperature | |
const int minTemp = -70; //minimum allowed temperature | |
const int maxRain = 200; //maximum allowed downpour | |
const int minRain = 0; //minimum allowed downpour | |
char again = 'Y'; //variable for knowing when to shut down |
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> | |
using namespace std; | |
//pre-declare methods used in the program | |
int menu (); | |
bool legal (int distance); | |
void race (int distance, int lap); | |
bool rerun (); | |
float timeToFloat (int m, int s, int h); | |
void floatToTime (float h); |
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
// Program for å administrere telefonnumre (og adresser) for ulike | |
// kontakter/familie/venner. | |
// INCLUDE: | |
#include <fstream> // ifstream | |
#include <iostream> // cout, cin | |
#include <cctype> // toupper | |
#include <cstring> // strcmp, strlen | |
using namespace std; |
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
/** Oblig 2 | |
* Objekt-orientert Programmering | |
* Snorre Brecheisen (******) | |
* Spillprogrammering | |
********************************/ | |
/** INCLUDES **/ | |
#include <cstring> | |
#include <cctype> | |
#include <fstream> |
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
/** Algmet Oblig 4 | |
* Snorre Brecheisen (******) | |
* 10HBSPA | |
*************************************/ | |
/** INCLUDES **/ | |
#include <fstream> | |
#include <iostream> | |
using namespace std; | |
/** CLASSES/NODES **/ | |
struct node { |
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
// never use GitHub for Windows if you want to avoid losing all your code and most of your hair | |
// setup | |
git init // initialize folder for git repo | |
git remote add origin [email protected]:username/reponame.git // add repo to track | |
git branch -u origin/master // set upstream to origin master (no more "origin master" required after git pull/push | |
// alternatively | |
git push --set-upstream origin master | |
// check status of local repo |
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
// ==UserScript== | |
// @name Sensor Array Hide Self | |
// @author Snorre Brechisen | |
// @description Lets the user toggle visibility of owned fleets. | |
// @version 0.95 | |
// @include http://www.war-facts.com/sensorArray.php* | |
// @exclude http://www.war-facts.com/sensorArray.php?fleet* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js | |
// @grant GM_getValue | |
// @grant GM_setValue |