This file contains hidden or 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
public int calcTax(decimal agi) | |
{ | |
// Create Arrays to hold Income Cutoffs and tax rates | |
// Storing these numbers like so allows for them to be changed without much issue | |
decimal[] incomeCutoffs = { 999.99m, 9999.99m, 19999.99m, 29999.99m }; | |
decimal[] rates = { .1m, .15m, .20m, .25m, .28m }; | |
decimal | |
max0 = incomeCutoffs[0] * rates [0], | |
max1 = (incomeCutoffs[1] - incomeCutoffs[0]) * rates [1], | |
max2 = (incomeCutoffs[2] - incomeCutoffs[1]) * rates [2], |
This file contains hidden or 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 <conio.h> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
double getNum(); | |
int getInt(); |
This file contains hidden or 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 <ctype.h> | |
#include <string> | |
#include <fstream> | |
#include <sstream> | |
using namespace std; | |
int main() | |
{ |
This file contains hidden or 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 <fstream> | |
#include <string> | |
using namespace std; | |
struct FileText { | |
int lineNumber; // Line number from original file | |
long long fileOffset; // Number of bytes from start line starts | |
int length; // Length of line |
This file contains hidden or 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 <iomanip> | |
#include <string> | |
using namespace std; | |
struct MovieData { | |
string title; | |
string director; | |
int yearReleased; | |
double runningTime; |
This file contains hidden or 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 <iomanip> | |
using namespace std; | |
int populateIntegerArray(int *arrayPtr, int arraySize); | |
void displayIntegerArray(int *arrayPtr, int arraySize); | |
int findMaximumInteger(int *arrayPtr, int arraySize); | |
double getNum(); | |
int getInt(); |
This file contains hidden or 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() { | |
const int SIZE = 5; | |
cout << "Demonstrating a potential pitfall of pointer arithmetic...\n\n"; | |
This file contains hidden or 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 <fstream> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
void selectionSort(string[], int); | |
void showArray(string[], int); | |
int main() { |
This file contains hidden or 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 <fstream> | |
#include <string> | |
using namespace std; | |
int maxValue(int[], int); | |
int minValue(int[], int); | |
int sumValue(int[], int); | |
double avgValue(int[], int); |
This file contains hidden or 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 <fstream> | |
#include <string> | |
using namespace std; | |
int main() { | |
// String variables for holding user inputted filenames | |
// And temp for temporarily holding a line of text from file | |
string fileNameIn, fileNameOut, temp; | |
// ifstream and ofstream for read/write |
NewerOlder