Does coding turn you on?

 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
I just love it when programming languages are displayed so gracefully, perfect... It gives me an insta-boner.

What turns you on?


 
cxfhvxgkcf-56:7
| Marty Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: SoporificSlash
IP: Logged

15,656 posts
 
This user has been blacklisted from posting on the forums. Until the blacklist is lifted, all posts made by this user have been hidden and require a Sep7agon® SecondClass Premium Membership to view.


Casper | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Casper
IP: Logged

10,158 posts
Toys are hereby declared:
ILLEGAL
IMMORAL
UNLAWFUL
 anyone found with a TOY in his possession will be
placed under ARREST and thrown in the DUNGEON!
No kidding!               🅱
Code: [Select]
#include <stdio.h>
#include "boolean.h"
#include "complex.h"
#include "complex_arith.h"
#include "complex_IO.h"


int main(void){
boolean quit = FALSE;
boolean showmenu = TRUE;
int menu_sel;

while (!quit) {
if (showmenu) {
printf("1  Add\n");
printf("2  Subtract\n");
printf("3  Multiply\n");
printf("4  Divide\n");
printf("5  Conjugate\n");
printf("6  Negate\n");
printf("7  Toggle Menu\n");
printf("8  Quit\n");
scanf("%d", &menu_sel);
else {
printf("Enter a selection (4 turn menu on):\n");
scanf("%d", &menu_sel);
switch (menu_sel){
case 1: num1 = read_complex();
num2 = read_complex();
ans = add_complex();
write_complex(ans);
break;
case 2: num1 = read_complex();
num2 = read_complex();
ans = subract_complex();
write_complex(ans);
break;
case 3: num1 = read_complex();
num2 = read_complex();
ans = multiply_complex();
write_complex(ans);
break;
case 4: num1 = read_complex();
num2 = read_complex();
ans = divide_complex();
write_complex(ans);
break;
case 5: num1 = read_complex();
num2 = read_complex();
ans = conjugate_complex();
write_complex(ans);
break;
case 6: num1 = read_complex();
num2 = read_complex();
ans = negate_complex();
write_complex(ans);
break;
case 7: if (showmenu == TRUE)
showmenu = FALSE;
else {
showmenu = TRUE }
break;
case 8: quit = TRUE;
break;
default: printf("%c is not a valid menu option\n", menu_sel);

}

are you hard yet bae?
This scares me...


Sprungli | Heroic Invincible!
 
more |
XBL: RadialRacer
PSN:
Steam:
ID: Sprungli
IP: Logged

3,875 posts
( ͡° ͜ʖ ͡°)
Pythons move gracefully


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
Code: [Select]
#include <stdio.h>
#include "boolean.h"
#include "complex.h"
#include "complex_arith.h"
#include "complex_IO.h"


int main(void){
boolean quit = FALSE;
boolean showmenu = TRUE;
int menu_sel;

while (!quit) {
if (showmenu) {
printf("1  Add\n");
printf("2  Subtract\n");
printf("3  Multiply\n");
printf("4  Divide\n");
printf("5  Conjugate\n");
printf("6  Negate\n");
printf("7  Toggle Menu\n");
printf("8  Quit\n");
scanf("%d", &menu_sel);
else {
printf("Enter a selection (4 turn menu on):\n");
scanf("%d", &menu_sel);
switch (menu_sel){
case 1: num1 = read_complex();
num2 = read_complex();
ans = add_complex();
write_complex(ans);
break;
case 2: num1 = read_complex();
num2 = read_complex();
ans = subract_complex();
write_complex(ans);
break;
case 3: num1 = read_complex();
num2 = read_complex();
ans = multiply_complex();
write_complex(ans);
break;
case 4: num1 = read_complex();
num2 = read_complex();
ans = divide_complex();
write_complex(ans);
break;
case 5: num1 = read_complex();
num2 = read_complex();
ans = conjugate_complex();
write_complex(ans);
break;
case 6: num1 = read_complex();
num2 = read_complex();
ans = negate_complex();
write_complex(ans);
break;
case 7: if (showmenu == TRUE)
showmenu = FALSE;
else {
showmenu = TRUE }
break;
case 8: quit = TRUE;
break;
default: printf("%c is not a valid menu option\n", menu_sel);

}

are you hard yet bae?
mmm NYYYYEESSSSS


N/A | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Zenmaster
IP: Logged

7,823 posts
 
This user has been blacklisted from posting on the forums. Until the blacklist is lifted, all posts made by this user have been hidden and require a Sep7agon® SecondClass Premium Membership to view.


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
Code: [Select]
OP is a niggermanRate my coding.
0/10

No instance variables declared. Kill yourself.


N/A | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Zenmaster
IP: Logged

7,823 posts
 
This user has been blacklisted from posting on the forums. Until the blacklist is lifted, all posts made by this user have been hidden and require a Sep7agon® SecondClass Premium Membership to view.


 
Mat Cauthon
| Ravens
 
more |
stop();


 
True Turquoise
| MILF Hunter
 
more |
XBL: Anora Whisper
PSN: True_Turquoise
Steam: truturquoise
ID: True Turquoise
IP: Logged

25,382 posts
fuck you


... I don't get turned on by anything!


Anonymous (User Deleted) | Legendary Invincible!
 
more |
XBL:
PSN:
Steam:
ID: Kupo
IP: Logged

6,364 posts
 
Code: [Select]
class StopPosting {

    public static void main(String[] args) {
         
         System.out.println("It's time to stop posting."); // CUNT   
         System.exit(0);

    }
}
Last Edit: March 11, 2015, 02:40:33 PM by Kupo


 
gats
| alo
 
more |
XBL: goooots
PSN:
Steam: goootsby
ID: Gatsby
IP: Logged

19,293 posts
You will find out who you are not a thousand times, before you ever discover who you are. I hope you find peace in yourself and learn to love instead of hate.
Code: [Select]
Throw(x100) that boypussy
)
)
###
###
Ay lmao


Coco | Heroic Unstoppable!
 
more |
XBL: Monsieur Cocco
PSN:
Steam: Mr Coco
ID: Cocos
IP: Logged

2,576 posts
 
Code: [Select]

#include "Apriori.h"

using namespace std;

/* FUNCTION: Apriori()
*  PURPOSE: Basic constructor
*  =========================================================== */
Apriori::Apriori()
{
L = new Queue<LinkedList<Item>>;
C = new Queue<LinkedList<Item>>;
}

void Apriori::appendItemsets(Item& item1, Item& item2, LinkedList<Item>& newFrequentItemset)
{
//This will be called in a loop, going through the list of frequent n itemsets
//Ex: 3-itemsets: check if the mDataArray[0] and [1] match between the 2 items
if(headersMatch(item1, item2, item1.getSize() - 1)) //Compare the headers (loops through all elements except the last one)
{
//Make a new item of size n + 1
Item newItem(item1.getSize() + 1);
//Fill newItem's mDataArray with either one of the original item's contents:
for(int i = 0; i < newItem.getSize() - 2; i++)
{
newItem.mDataArray[i] = item1.mDataArray[i];

}
//Append the last element of item2 to newItem
for (int i = newItem.getSize() - 2; i < newItem.getSize(); i++)
{
if (newItem.getSize() % 2 == 0)
{
if (i % 2 == 0)
newItem.mDataArray[i] = item2.mDataArray[i];
else
newItem.mDataArray[i] = item1.mDataArray[i - 1];
}
else
{
if (i % 2 == 0)
newItem.mDataArray[i] = item2.mDataArray[i - 1];
else
newItem.mDataArray[i] = item1.mDataArray[i];
}
}

newFrequentItemset.insert(newItem); //Add the item to the new frequent itemset
}
}

LinkedList<Item>* Apriori::apriori_gen(LinkedList<Item>* originalList)
{
timer.startClock();

LinkedList<Item> *newItemset = new LinkedList<Item>();

for (int i = 0; i < originalList->getCount(); i++)
{
Item temp1, temp2;

temp1 = originalList->getData(i);

for (int j = i + 1; j < originalList->getCount(); j++)
{
temp2 = originalList->getData(j);

appendItemsets(temp1, temp2, *newItemset);
}
}

countFrequency(newItemset);

prune(newItemset);

timeString = timer.getTime();

OutputResults(newItemset);

return newItemset;
}

void Apriori::calcMinSupport(float thresholdPercent, int numTransactions)
{
mMinSupport = (int)(numTransactions * (thresholdPercent / 100));
}


bool Apriori::transactionContains(Item theItem, LinkedList<int>& theTransaction)
{
int frequency = 0;

for(int j = 0; j < theItem.getSize(); j++) //Loop through the Itemset
{
if(theTransaction.isExist(theItem.mDataArray[j]))
{
frequency++; //Find out how many items in the transaction are in the itemset
}
}
if(frequency < theItem.getSize()) //If frequency isn't as big as the itemset, it went through the transaction and couldn't find all of the itemset's contents
{
return false;
}

return true;

}

void Apriori::countFrequency(LinkedList<Item> *tmpItemList)
{

for(int i = 0; i < tmpItemList->getCount(); i++) //Loop through every item in the set
{
for(int j = 0; j < mNumTransactions; j++) //Loop through all of the transactions
{
if(transactionContains(tmpItemList->getData(i), mTransactions[j]))
{
tmpItemList->getData(i).increaseFrequency();
}

}

}

}


LinkedList<Item>* Apriori::genOneItemsets()
{
timer.startClock();

LinkedList<Item> *Ltemp = new LinkedList<Item>();; //Stores unique item structures

Item *Itemp; //Dynamically allocated Item to popullate Ltemp with

bool found = false; //Used to tell whether or not a number from mDataSet is unique or not
int index; //Index at where a non-unique number can be "placed" in Ltemp

for (int i = 0; i < mNumTransactions; i++) //Runs through entire mDataSet list
{
for (int j = 0; j < mTransactions[i].getCount(); j++)
{
if (Ltemp->getCount() == 0) //If Ltemp is empty
{
if (mTransactions->getCount() == 0) //If mDataset is empty
{
return Ltemp; //Empty list
}

else
{
//Initialization of new dynamically allocated Item
Itemp = new Item(1);
Itemp->append(mTransactions[i].getData(j));
Itemp->increaseFrequency();

//Inserts new Item into Ltemp
Ltemp->insert(*Itemp);
}
}

else
{
for (int k = 0; k < Ltemp->getCount(); k++) //Runs through every Item in Ltemp
{
if (Ltemp->getData(k).mDataArray[0] == mTransactions[i].getData(j)) //Compares Ltemp Item numbers with current number in mDataSet
{
found = true;
index = k; //set index to current Item in Ltemp
k = Ltemp->getCount(); //jump out of loop
}
}

if (found)
{
Item temp = Ltemp->getData(index); //increase count
temp.increaseFrequency();
Ltemp->setData(index, temp);
}

else
{
//Initialization of new dynamically allocated Item
Itemp = new Item(1);
Itemp->append(mTransactions[i].getData(j));
Itemp->increaseFrequency();

//Inserts new Item into Ltemp
Ltemp->insert(*Itemp);
}
}
}

//reset found
found = false;
}

prune(Ltemp);

timeString = timer.getTime();

OutputResults(Ltemp);

return Ltemp;
}

LinkedList<Item>* Apriori::genTwoItemsets(LinkedList<Item>* tmpList)
{
timer.startClock();

Item *templateItem = new Item(2);
LinkedList<Item>* setArray = new LinkedList<Item>;

for (int i = 0; i < tmpList->getCount(); i++)
{
for (int j = i + 1; j < tmpList->getCount(); j++)
{
templateItem->mDataArray[0] = tmpList->getData(i).mDataArray[0];
templateItem->mDataArray[1] = tmpList->getData(j).mDataArray[0];
setArray->insert(*templateItem);
templateItem = new Item(2);
}
}

countFrequency(setArray);

prune(setArray);

timeString = timer.getTime();

OutputResults(setArray);

return setArray;
}

void Apriori::GetInput()
{
LinkedList<int> tmp;
string filename, filenameData, filenameInfo;
float thresholdPercent;

// First have the user input the dataset filename and the minimum threshold percent
cout << "Enter input file name (w/o file extension): ";
cin >> filename;
cout << "Enter minimum threshold percent: ";
cin >> thresholdPercent;


cout << "Enter output file name (w/o file extension):";
cin >> outputFile;

outputFile = outputFile + ".txt";
output.open(outputFile);

// The .dat file is the actual data, .input is the information about the data
filenameData = filename + ".dat";
filenameInfo = filename + ".input";


ifstream input;
input.open(filenameInfo);

int averageTransLength, numUniqueItems, numTransactions;

// retrieve info from .input file
input >> averageTransLength;
input >> numUniqueItems;
input >> numTransactions;

mTransactions = new LinkedList<int>[numTransactions];

input.close();

input.open(filenameData);

mNumTransactions = numTransactions;

calcMinSupport(thresholdPercent, numTransactions);

int i = 0;

// Load everything from .dat into a LinkedList in the Apriori class
if(input.good())
{
string temp;
while (!input.eof()) //!input.eof()
{
input >> temp;

tmp.insert(atoi(temp.c_str()));

mTransactions[i].insert(atoi(temp.c_str()));

if (input.peek() == '\n')
{
i++;
}
}

input.close();
}
else if(input.fail())
{
cout << "\nERROR READING FROM FILE\n";
}
}

bool Apriori::headersMatch(Item& item1, Item& item2, int headerSize)
{
for (int i = 0; i < headerSize; i++)
{
if(item1.mDataArray[i] != item2.mDataArray[i])
return false;
}
return true;
}

void Apriori::OutputResults(LinkedList<Item>* itemset)
{
if(output.good() && !itemset->isEmpty())
{
Item* tmp = new Item(itemset->getData(0).getSize());
for (int i = 0; i < itemset->getCount(); i++)
{
*tmp = itemset->getData(i);
output << *tmp << endl; //Write the item's contents on one line
}
output << "Time: " << timeString << endl;
}
}

void Apriori::prune(LinkedList<Item> *itemset)
{
for (int i = 0; i < itemset->getCount(); i++)
{
if (itemset->getData(i).getFrequency() < mMinSupport)
{
itemset->removeElementAt(i);
i--;
}
}
}

void Apriori::RunAlgorithm()
{
// put the frequent 1-itemsets into L
L->enqueue(genOneItemsets());

L->enqueue(genTwoItemsets(L->dequeue()));

while (L->mHead->mData.getCount() != 0) // this process will repeat until the pruning of C finds nothing frequent, at which point we have found all of our frequen itemsets
{
// take the current itemset, and in apriori_gen find all of its subsets, and then put that set of subsets into C
// in apriori_gen remember to call OutputResults(*1-itemset*) and append the time taken onto timeStrings, so that we have a record of it in our output file
C->enqueue(apriori_gen(L->dequeue()));

// prune C so that only the items that meet the min support remain, then put that into L
L->enqueue(C->dequeue());

}

output.close();
}

Bitches love data structures.


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
Code: [Select]

#include "Apriori.h"

using namespace std;

/* FUNCTION: Apriori()
*  PURPOSE: Basic constructor
*  =========================================================== */
Apriori::Apriori()
{
L = new Queue<LinkedList<Item>>;
C = new Queue<LinkedList<Item>>;
}

void Apriori::appendItemsets(Item& item1, Item& item2, LinkedList<Item>& newFrequentItemset)
{
//This will be called in a loop, going through the list of frequent n itemsets
//Ex: 3-itemsets: check if the mDataArray[0] and [1] match between the 2 items
if(headersMatch(item1, item2, item1.getSize() - 1)) //Compare the headers (loops through all elements except the last one)
{
//Make a new item of size n + 1
Item newItem(item1.getSize() + 1);
//Fill newItem's mDataArray with either one of the original item's contents:
for(int i = 0; i < newItem.getSize() - 2; i++)
{
newItem.mDataArray[i] = item1.mDataArray[i];

}
//Append the last element of item2 to newItem
for (int i = newItem.getSize() - 2; i < newItem.getSize(); i++)
{
if (newItem.getSize() % 2 == 0)
{
if (i % 2 == 0)
newItem.mDataArray[i] = item2.mDataArray[i];
else
newItem.mDataArray[i] = item1.mDataArray[i - 1];
}
else
{
if (i % 2 == 0)
newItem.mDataArray[i] = item2.mDataArray[i - 1];
else
newItem.mDataArray[i] = item1.mDataArray[i];
}
}

newFrequentItemset.insert(newItem); //Add the item to the new frequent itemset
}
}

LinkedList<Item>* Apriori::apriori_gen(LinkedList<Item>* originalList)
{
timer.startClock();

LinkedList<Item> *newItemset = new LinkedList<Item>();

for (int i = 0; i < originalList->getCount(); i++)
{
Item temp1, temp2;

temp1 = originalList->getData(i);

for (int j = i + 1; j < originalList->getCount(); j++)
{
temp2 = originalList->getData(j);

appendItemsets(temp1, temp2, *newItemset);
}
}

countFrequency(newItemset);

prune(newItemset);

timeString = timer.getTime();

OutputResults(newItemset);

return newItemset;
}

void Apriori::calcMinSupport(float thresholdPercent, int numTransactions)
{
mMinSupport = (int)(numTransactions * (thresholdPercent / 100));
}


bool Apriori::transactionContains(Item theItem, LinkedList<int>& theTransaction)
{
int frequency = 0;

for(int j = 0; j < theItem.getSize(); j++) //Loop through the Itemset
{
if(theTransaction.isExist(theItem.mDataArray[j]))
{
frequency++; //Find out how many items in the transaction are in the itemset
}
}
if(frequency < theItem.getSize()) //If frequency isn't as big as the itemset, it went through the transaction and couldn't find all of the itemset's contents
{
return false;
}

return true;

}

void Apriori::countFrequency(LinkedList<Item> *tmpItemList)
{

for(int i = 0; i < tmpItemList->getCount(); i++) //Loop through every item in the set
{
for(int j = 0; j < mNumTransactions; j++) //Loop through all of the transactions
{
if(transactionContains(tmpItemList->getData(i), mTransactions[j]))
{
tmpItemList->getData(i).increaseFrequency();
}

}

}

}


LinkedList<Item>* Apriori::genOneItemsets()
{
timer.startClock();

LinkedList<Item> *Ltemp = new LinkedList<Item>();; //Stores unique item structures

Item *Itemp; //Dynamically allocated Item to popullate Ltemp with

bool found = false; //Used to tell whether or not a number from mDataSet is unique or not
int index; //Index at where a non-unique number can be "placed" in Ltemp

for (int i = 0; i < mNumTransactions; i++) //Runs through entire mDataSet list
{
for (int j = 0; j < mTransactions[i].getCount(); j++)
{
if (Ltemp->getCount() == 0) //If Ltemp is empty
{
if (mTransactions->getCount() == 0) //If mDataset is empty
{
return Ltemp; //Empty list
}

else
{
//Initialization of new dynamically allocated Item
Itemp = new Item(1);
Itemp->append(mTransactions[i].getData(j));
Itemp->increaseFrequency();

//Inserts new Item into Ltemp
Ltemp->insert(*Itemp);
}
}

else
{
for (int k = 0; k < Ltemp->getCount(); k++) //Runs through every Item in Ltemp
{
if (Ltemp->getData(k).mDataArray[0] == mTransactions[i].getData(j)) //Compares Ltemp Item numbers with current number in mDataSet
{
found = true;
index = k; //set index to current Item in Ltemp
k = Ltemp->getCount(); //jump out of loop
}
}

if (found)
{
Item temp = Ltemp->getData(index); //increase count
temp.increaseFrequency();
Ltemp->setData(index, temp);
}

else
{
//Initialization of new dynamically allocated Item
Itemp = new Item(1);
Itemp->append(mTransactions[i].getData(j));
Itemp->increaseFrequency();

//Inserts new Item into Ltemp
Ltemp->insert(*Itemp);
}
}
}

//reset found
found = false;
}

prune(Ltemp);

timeString = timer.getTime();

OutputResults(Ltemp);

return Ltemp;
}

LinkedList<Item>* Apriori::genTwoItemsets(LinkedList<Item>* tmpList)
{
timer.startClock();

Item *templateItem = new Item(2);
LinkedList<Item>* setArray = new LinkedList<Item>;

for (int i = 0; i < tmpList->getCount(); i++)
{
for (int j = i + 1; j < tmpList->getCount(); j++)
{
templateItem->mDataArray[0] = tmpList->getData(i).mDataArray[0];
templateItem->mDataArray[1] = tmpList->getData(j).mDataArray[0];
setArray->insert(*templateItem);
templateItem = new Item(2);
}
}

countFrequency(setArray);

prune(setArray);

timeString = timer.getTime();

OutputResults(setArray);

return setArray;
}

void Apriori::GetInput()
{
LinkedList<int> tmp;
string filename, filenameData, filenameInfo;
float thresholdPercent;

// First have the user input the dataset filename and the minimum threshold percent
cout << "Enter input file name (w/o file extension): ";
cin >> filename;
cout << "Enter minimum threshold percent: ";
cin >> thresholdPercent;


cout << "Enter output file name (w/o file extension):";
cin >> outputFile;

outputFile = outputFile + ".txt";
output.open(outputFile);

// The .dat file is the actual data, .input is the information about the data
filenameData = filename + ".dat";
filenameInfo = filename + ".input";


ifstream input;
input.open(filenameInfo);

int averageTransLength, numUniqueItems, numTransactions;

// retrieve info from .input file
input >> averageTransLength;
input >> numUniqueItems;
input >> numTransactions;

mTransactions = new LinkedList<int>[numTransactions];

input.close();

input.open(filenameData);

mNumTransactions = numTransactions;

calcMinSupport(thresholdPercent, numTransactions);

int i = 0;

// Load everything from .dat into a LinkedList in the Apriori class
if(input.good())
{
string temp;
while (!input.eof()) //!input.eof()
{
input >> temp;

tmp.insert(atoi(temp.c_str()));

mTransactions[i].insert(atoi(temp.c_str()));

if (input.peek() == '\n')
{
i++;
}
}

input.close();
}
else if(input.fail())
{
cout << "\nERROR READING FROM FILE\n";
}
}

bool Apriori::headersMatch(Item& item1, Item& item2, int headerSize)
{
for (int i = 0; i < headerSize; i++)
{
if(item1.mDataArray[i] != item2.mDataArray[i])
return false;
}
return true;
}

void Apriori::OutputResults(LinkedList<Item>* itemset)
{
if(output.good() && !itemset->isEmpty())
{
Item* tmp = new Item(itemset->getData(0).getSize());
for (int i = 0; i < itemset->getCount(); i++)
{
*tmp = itemset->getData(i);
output << *tmp << endl; //Write the item's contents on one line
}
output << "Time: " << timeString << endl;
}
}

void Apriori::prune(LinkedList<Item> *itemset)
{
for (int i = 0; i < itemset->getCount(); i++)
{
if (itemset->getData(i).getFrequency() < mMinSupport)
{
itemset->removeElementAt(i);
i--;
}
}
}

void Apriori::RunAlgorithm()
{
// put the frequent 1-itemsets into L
L->enqueue(genOneItemsets());

L->enqueue(genTwoItemsets(L->dequeue()));

while (L->mHead->mData.getCount() != 0) // this process will repeat until the pruning of C finds nothing frequent, at which point we have found all of our frequen itemsets
{
// take the current itemset, and in apriori_gen find all of its subsets, and then put that set of subsets into C
// in apriori_gen remember to call OutputResults(*1-itemset*) and append the time taken onto timeStrings, so that we have a record of it in our output file
C->enqueue(apriori_gen(L->dequeue()));

// prune C so that only the items that meet the min support remain, then put that into L
L->enqueue(C->dequeue());

}

output.close();
}

Bitches love data structures.
i came


Ásgeirr | Mythic Inconceivable!
 
more |
XBL: ossku
PSN:
Steam: ossku/Oss
ID: Ossku
IP: Logged

13,543 posts
The angel agreed to trade a set of white wings for the head of another demon. Overjoyed, the demon killed one of his own and plucked the head right off its still-warm body.

The angel then led the demon to heaven, where he underwent centuries of the cruelest tortures imaginable. Finally, the pain was so great that he lost consciousness - at which point his dark wings turned the promised shade of white.
mmmmm Machine Code
YouTube
Last Edit: March 11, 2015, 03:13:40 PM by Oss


Luke | Legendary Invincible!
 
more |
XBL:
PSN:
Steam:
ID: Luke
IP: Logged

4,121 posts
Rinzler
the matrix


Ushan | Mythic Invincible!
 
more |
XBL: Ushan the Panda
PSN: Ushan-the-Panda
Steam: Ushan
ID: Ushan
IP: Logged

7,159 posts
(っಠ‿ಠ)っ
ʕっ•ᴥ•ʔっ
(っ◕‿◕)っ
(っ ͡ ° ͜ ʖ ͡ ° )っ
(っ ͠° ͟ل͜ ͡°)っ
(っ´°ω°`)っ
Code: [Select]
#include <stdio.h>
#include "boolean.h"
#include "complex.h"
#include "complex_arith.h"
#include "complex_IO.h"


int main(void){
boolean quit = FALSE;
boolean showmenu = TRUE;
int menu_sel;

while (!quit) {
if (showmenu) {
printf("1  Add\n");
printf("2  Subtract\n");
printf("3  Multiply\n");
printf("4  Divide\n");
printf("5  Conjugate\n");
printf("6  Negate\n");
printf("7  Toggle Menu\n");
printf("8  Quit\n");
scanf("%d", &menu_sel);
else {
printf("Enter a selection (4 turn menu on):\n");
scanf("%d", &menu_sel);
switch (menu_sel){
case 1: num1 = read_complex();
num2 = read_complex();
ans = add_complex();
write_complex(ans);
break;
case 2: num1 = read_complex();
num2 = read_complex();
ans = subract_complex();
write_complex(ans);
break;
case 3: num1 = read_complex();
num2 = read_complex();
ans = multiply_complex();
write_complex(ans);
break;
case 4: num1 = read_complex();
num2 = read_complex();
ans = divide_complex();
write_complex(ans);
break;
case 5: num1 = read_complex();
num2 = read_complex();
ans = conjugate_complex();
write_complex(ans);
break;
case 6: num1 = read_complex();
num2 = read_complex();
ans = negate_complex();
write_complex(ans);
break;
case 7: if (showmenu == TRUE)
showmenu = FALSE;
else {
showmenu = TRUE }
break;
case 8: quit = TRUE;
break;
default: printf("%c is not a valid menu option\n", menu_sel);

}

are you hard yet bae?

The organization is what really makes me hard.


RomanGladiator | Legendary Invincible!
 
more |
XBL: BobaFettIsAlive
PSN:
Steam:
ID: RomanGladiator
IP: Logged

4,888 posts
 
Microsoft Excel spreadsheets make me wet.


g💚jira | Heroic Unstoppable!
 
more |
XBL:
PSN:
Steam:
ID: HeyLookItsMisterGojira
IP: Logged

1,925 posts
 
Tip: Name your variables after chess pieces while coding