C Board  

Go Back   C Board > Community Boards > Contests Board

View Poll Results: Vote for Contest #1 Winner
Brain 2 40.00%
GoGators 0 0%
Hunter2 3 60.00%
Voters: 5. You may not vote on this poll

Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2005, 07:02 PM   #1
Banned
 
Join Date: Jun 2005
Posts: 594
Vote Now Please :)

This is a vote for the best code for CONTEST #1 found
on this page, you should vote on the code that
looks the ebst and follows all the requirements,
thanks ahead of time for your participation.

Winner of Contest #2 and #3 and the rule for Contest #1
can be found here :

Beginners Contest, Others our Welcome

THE POLL WILL CLOSE IN 5 DAYS
Attached Files
File Type: cpp BrainContestNumber1.cpp (6.4 KB, 75 views)
File Type: cpp Hunter2ContestNumber1.cpp (590 Bytes, 80 views)

Last edited by ILoveVectors; 07-01-2005 at 07:58 PM.
ILoveVectors is offline   Reply With Quote
Old 07-01-2005, 07:08 PM   #2
Super Moderator
 
Join Date: Sep 2001
Posts: 4,680
Moved to Contest Board
sean is offline   Reply With Quote
Old 07-01-2005, 07:25 PM   #3
*this
 
Join Date: Mar 2005
Posts: 498
Nice job Hunter2, your code is infact the shortest and it works great. Although as I read in your other post you forgot capitals, but still its a nice implementation I must say.

Lol saw gators and it had numbers so I was thinking wow not going to vote for him, but then realized it was a different program... But I chose hunter2 because his is the shortest and it accomplishes the task.

Sorry I think its weird to have people vote on programs that are different in nature, but thats just my opinion.
JoshR is offline   Reply With Quote
Old 07-01-2005, 07:55 PM   #4
Banned
 
Join Date: Jun 2005
Posts: 594
Ah that was a mistake on my part, i posted the wrong code.
Gogators is not in the running of this competition.

Sorry about that.

Last edited by ILoveVectors; 07-01-2005 at 08:00 PM.
ILoveVectors is offline   Reply With Quote
Old 07-01-2005, 08:13 PM   #5
Registered User
 
major_small's Avatar
 
Join Date: May 2003
Posts: 2,787
while brain's handles errors and such more elegantly, I must say that Hunter2's code is much more straightforward and to the point...

and on the topic of gogator's code, what about this:
Code:
#include <vector>
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void makeVector(string line, vector <string> &Adjust); 
int main(void){
    vector <string> Storage; 
    string infileName,outfileName, fileLine;
    fstream input_file, output_file; 
    cout << "Enter the filename to read in: ";
    cin >> infileName;
    input_file.open(infileName.c_str(),ios::in);           
    cout << endl << "Enter the filename to read out to: ";
    cin.ignore(80,'\n');
    getline(cin, outfileName);
    output_file.open(outfileName.c_str(), ios::out);   
    if(!input_file.fail()){   
        while(getline(input_file, fileLine)){  
              makeVector(fileLine, Storage);               
        }
    for(int i=0; i<Storage.size(); i++) output_file << Storage[i] << endl;  
    }
    return 0;
}
void makeVector(string line, vector <string> &Adjust){
     string vowels = "aeiouyAEIOUY", tempLine = line; 
     for(int i=0; i<line.length(); i++){              
          for(int j=0; j<vowels.length(); j++){      
               if(line[i] == vowels[j]){              
                    int line_diff = line.length()-tempLine.length(); 
                    Adjust.push_back(line.substr(line_diff,i-line_diff)); 
                    tempLine = line.substr(i,line.length());  
               }
          }
     }
     Adjust.push_back(tempLine); 
}
(sorry gogator if you didn't want that reposted - PM me and I'll edit it out)
__________________
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech


Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)

The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Last edited by major_small; 07-01-2005 at 08:21 PM.
major_small is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Who did you vote for? (anonymous poll) abachler General Discussions 91 11-11-2008 05:55 AM
good or bad game idea you vote? L_I_Programmer Game Programming 3 03-15-2003 07:14 AM
Would you vote for Bush again? incognito A Brief History of Cprogramming.com 92 03-12-2003 04:07 PM
vote for ur favorite team~ black A Brief History of Cprogramming.com 27 05-29-2002 07:03 AM


All times are GMT -6. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22