demented
Veteran
Cool Title Girl
Vade Mecum
Posts: 245
|
Post by demented on Feb 3, 2006 0:07:28 GMT -5
De you don't have to try at all for me ot like you I impulsivly liek everyone until I find something to dislike about them and so far I see nothing to dislike you and I doubt I ever will. *nods* WEWT! Nish is my new hero! *flowers her with chocolate or whatever she likes*
|
|
|
Post by Caligo [Inactive] on Feb 3, 2006 1:38:36 GMT -5
You'll find a reason not to like her, and if not, lemme help.
SPAM.
Or maybe that's just me.
Ah frig I was gonna say something and I forgot! Dammit!
|
|
Archangel
Recruit
And thus did the Archangel descend from Heaven itself...
Posts: 0
|
Post by Archangel on Feb 3, 2006 18:48:44 GMT -5
Ex, that was kinda harsh.
But anyways.... AWWWWWWWWWWWWW! Nishy and De getting along! So sweet!
Now, let's see if we can get them into some lesbian action. >.> Am I the only one that thinks that's sexy? <.<
Come on girls. You know that you want to.
LOL
|
|
|
Post by Vector on Feb 3, 2006 19:52:44 GMT -5
You're not alone, Mike. Not at all.
|
|
demented
Veteran
Cool Title Girl
Vade Mecum
Posts: 245
|
Post by demented on Feb 3, 2006 20:11:10 GMT -5
In the words of Z:
...
|
|
|
Post by Vector on Feb 3, 2006 20:21:23 GMT -5
XD Nice...
|
|
Archangel
Recruit
And thus did the Archangel descend from Heaven itself...
Posts: 0
|
Post by Archangel on Feb 3, 2006 21:05:15 GMT -5
I notice that wasn't a NO....
*looks happy and hopeful*
LOL
|
|
|
Post by Caligo [Inactive] on Feb 7, 2006 17:14:03 GMT -5
|
|
|
Post by Caligo [Inactive] on Feb 14, 2006 21:24:55 GMT -5
Week 5/6 inDec Concrete concrete.zip what we did to concrete today Assignment #2 - due 3/2 concreteans is the basis of assignment 2. Hackenslash to make it work - looks harder than it is. inDec: a b=3 c=5 d=4 a=b-- * ++c + --d = 3* 6 + 3 = 21 a=b++ + ++c - d++ = 3 + 6 - 4 = 5 a=--b * c-- / ++d = 2 * 5 / 5 = 2 a=b-- * --c / d-- = 3 * 4 / 4 = 3 a=++b / c-- / d++ = 4 / 5 / 4 = .02 concrete: Patio W 14ft L 12ft D 04in 2.07 3Y system("cls"); clear console screen system("sol"); runs Solitaire Do While does at least once ctrl+K or ctrl+F - auto format selected code (Alignment/tabs and such) do { Program } while(condition OK) //repeats do
|
|
|
Post by Caligo [Inactive] on Feb 21, 2006 20:33:42 GMT -5
Case 0; cout << "\n Good DATE"; break; //needed or the next one will be true too Case 1; cout << "\n Enter year 1000-2500." break; default; cout << "\n This happens if nothing else is picked..." break;
case 'a'; case 'A'; cout << "/nAlpha" << endl;
will do both
float totsqyard, carpet; int totsqyard0, length, width, pad, roomtot, reqsqyard;
cout << "/nEnter number of rooms: " << endl; cin >> roomtot
cout << "/n Enter Length of ??? //??? is roomtotal - (roomtotal--) cin >> length
cout << "/n Enter Width of ??? cin >> width
totsqyard = (length/3)*(width/3) reqsqyard = totsqyard
totsqyard0 = int(totalsqyard)
cout << "/nPadding Choices:" << endl cout << "/n1. Good - $3 per yard - [1-3 yr warrantee]" << endl; cout << "/n2. Better - $4 per yard - [3-5 yr warrantee]" << endl; cout << "/n3. Best - $5 per yard - [5-10 yr warrantee]" << endl; cout << "/n4. Excellent - $7 per yard - [10-20 yr warrantee]" << endl; cout << "/nEnter number of Padding Choice <1-4> "
cin >> choice
switch (choice) { case 1: pad = 3; break;
case 2: pad = 4; break;
case 3: pad = 5; break;
case 4: pad = 7; break;
default; cout << "/nPlease enter a number between 1 and 4 " << endl; //How reloop? }
cout << "/nEnter price of carpetting per yard for " << roomx << ": "<< endl; cin >> carpet
if (totsqyard - totsqyard0 > 0) { reqsqyard = totsqyard + 1 } cout << "/nRoom 1 Yards Required = $" << reqsqyard << endl; cout << "/nRoom 1 Installation Cost = $" << 5 * reqsqyard << endl; cout << "/nPadding Cost = $" << pad * reqsqyard << endl; cout << "/nCarpet Cost = $" << carpet * reqsqyard; total1 = ((5 * reqsqyard) + (pad * reqsqyard) + (carpet * reqsqyard)); cout << "/nTotal Cost = $" << total1 << endl;
|
|
|
Post by Caligo [Inactive] on Mar 7, 2006 20:48:30 GMT -5
full path in data streams for your own good...
C:\Documents and Settings\SC339\Desktop\\medals.dat
ifstream ifile("C:\\Docume~1\\SC339\\Desktop\\medals.dat"); //imputefilestream imputfile
ifile.eof() //end of file ifile.fail() //can't find it
|
|
|
Post by Caligo [Inactive] on Mar 21, 2006 22:51:25 GMT -5
|
|
|
Post by Caligo [Inactive] on Mar 23, 2006 3:58:32 GMT -5
//Program Name: Program 3 //Programmer: David A. Pierce //Narrative: This program reads in a data file containing information on salespeople // and prints out the statistics concerning quotas and an incentive plan. // //Input: prog3a.dat input file // format: // total salespeople - float - occurs once // Salesperson data - occurs for each salesperson // - salesperson name - string // - monthly quota - int // - Jan month sales - int // - Feb month sales - int // - March month sales - int // - April month sales - int // - May month sales - int // - June month sales - int // - July month sales - int // - Aug month sales - int // - Sept month sales - int // - Oct month sales - int // - Nov month sales - int // - Dec month sales - int // //Output: Fig. 3a // Total Salespeople: 4 // // Salesperson Quota Monthly Sales Under => // MBanner 35 35 35 35 35 35 35 35 34 35 35 35 36 1 11 // BHunter 40 20 40 70 35 45 78 34 56 73 15 41 55 4 8 // GJorgensen 60 62 47 68 40 53 62 88 18 15 72 12 19 7 5 // TSmith 25 66 32 41 89 27 25 29 33 54 27 32 45 0 12 // // // A "Sell IT! OR Else Campaign" must be mounted - 75% did not make yearly quotas // Consider firing: GJorgensen // //Constraints: The file is hardcoded in the program but if it can not be opened // display "Can't find file" and terminate program. // //Operations: // //1. Attach to file "prog3a.dat". //2. If unsuccessful - display error message and terminate program //3. get the number of salespeople present on the file //4. For every salesperson // a. get their name, quota, and each (12) month's sales // b. for every month // - check sales against quota // - if > or = quota, add 1 to the total months that made quota // - if < quota, add 1 to the total months that didn't make quota // - if even 1 month was under quota, add 1 to the number of salespeople // that didn't make the yearly quota // c. check for highest number of under quota months // - when found, store that salesperson's name //5. If more than 20% of the sales force did not make quota, display a message stating // the percent that came short and to implement the incentive plan as well to consider // firing the salesperson with the lowest number of months that met quota //6. Display data per Fig. 3a //
#include <iostream> #include <fstream> //data stream use #include <string> //for string variables/objects #include <iomanip>
using namespace std;
int main() { float numbersalespeople; string salespersonname; string leastsales; int quota; int jan; int feb; int mar; int apr; int may; int jun; int jul; int aug; int sep; int oct; int nov; int dec; int undermonths = 0; //the counter for months under quota per salesperson int okmonths = 0; //the counter for months that met quota per salesperson int leastokmonths = 0; //the counter for the most months under quota int underquota = 0; //the count to add to the running number under quota float numberunderquota = 0; //the running number under quota, used in % under calc float percentunder; //the % of the sales force under quota out of all people ifstream ifile("G:\\prog3a.dat"); //opens prog3a.dat file. Must be in same folder as program
if(ifile.fail()) //checks to see if file was opened { cout<< "Can't find file prog3a.dat"; return 0; // terminates program gracefully } //display headings to match Fig. 3a output //has to be done before we display the output ifile >> numbersalespeople; //inputs only one of this value for the input data stream
cout << "Total Salespeople: " << numbersalespeople << endl;
//display column headings
cout << endl << "Salesperson\tQuota\t\t Monthly Sales\t\tUnder\t>=" << endl; //get the rest of the data by salesperson for all salespeople on the data stream
ifile >> salespersonname >> quota >> jan >> feb >> mar >> apr >> may >> jun >> jul >> aug >> sep >> oct >> nov >> dec; //prime read of data for a salesperson
while(!ifile.eof()) //eof is a member function of istream - determines when data stops { //we must have all data for a salesperson before this if( jan < quota) //checks if the month's sales are less than the quota { undermonths++; //if so, adds one to the months under to be displayed } else { okmonths++; //if not, adds one to the months met to be displayed } if( feb < quota) { undermonths++; } else { okmonths++; } if( mar < quota) { undermonths++; } else { okmonths++; } if( apr < quota) { undermonths++; } else { okmonths++; } if( may < quota) { undermonths++; } else { okmonths++; } if( jun < quota) { undermonths++; } else { okmonths++; } if( jul < quota) { undermonths++; } else { okmonths++; } if( aug < quota) { undermonths++; } else { okmonths++; } if( sep < quota) { undermonths++; } else { okmonths++; } if( oct < quota) { undermonths++; } else { okmonths++; } if( nov < quota) { undermonths++; } else { okmonths++; } if( dec < quota) { undermonths++; } else { okmonths++; } if( undermonths > 0) //checks if any month is under quota, if so, adds to total underquota = 1; //1 is true, 0 is false cout << endl << salespersonname << "\t";
if(salespersonname.length() < 8) //check if name length is > 8 char in size
cout << "\t"; //2 tabs because of alignment if under 8 //char in size
cout << " " << quota << "\t" << jan << " " << feb << " " << mar << " " << apr << " " << may << " " << jun << " " << jul << " " << aug << " " << sep << " " << oct << " " << nov << " " << dec << "\t " << undermonths << "\t" << okmonths; //display final results based on Fig. 3a if(undermonths > leastokmonths) //tests if current salesperson has more short { //then the stored maximum, if so, stores name leastokmonths = undermonths; leastsales = salespersonname; }
numberunderquota = numberunderquota + underquota; //stores to total under if needed undermonths = 0; //resets local variables okmonths = 0; underquota = 0; ifile >> salespersonname >> quota >> jan >> feb >> mar >> apr >> may >> jun >> jul >> aug >> sep >> oct >> nov >> dec; //prime read of data for a salesperson } //end loop //finds percentage of people under quota percentunder = numberunderquota / numbersalespeople; percentunder = percentunder * 100; //makes the percentage a whole number
if(percentunder > 20) //if people under quota > 20% of sales force { //display message as per Fig. 3a cout << "\n\n\nA \"Sell IT! OR Else Campaign\" must be mounted - " << percentunder << "% did not make yearly quotas"; cout << "\nConsider firing: " << leastsales; }
cout << "\n\n"; //two linefeeds for display before the "Press any..." message return 0; //required because main() returns int }
|
|
|
Post by Caligo [Inactive] on Mar 23, 2006 4:20:22 GMT -5
C++ classes starting tomorrow night - be on MSN if you're interested
|
|
|
Post by Caligo [Inactive] on Mar 28, 2006 21:24:40 GMT -5
|
|