Skip to content

Instantly share code, notes, and snippets.

@ddribin
Created March 6, 2014 23:42
Show Gist options
  • Save ddribin/9402109 to your computer and use it in GitHub Desktop.
Save ddribin/9402109 to your computer and use it in GitHub Desktop.
Spam Code
#include <iostream>
#include <algorithm>
using namespace std;
int mostpancakes(int array[]){
int temp=0;
for(int i=0;i<10;i++) {
if(array[i] > temp){
temp=i; }
}return temp;}int main() {
int iPerson[10];
for(int i=0;i<10;i++) {
cout<< "Enter how many pancakes person:"<<i<<" eat:";
cin>> iPerson[i]; }
cout<<"\nPerson:"<<mostpancakes(iPerson)<<" eat most pancakes";
system("pause");
return 0
return temp; *
unsigned int GetBiggestPancakeConsumer( const unsigned int array[], const unsigned int iNbConsumers )
// array[] could be renamed as iConsumptions[] for clarity
unsigned int iBiggestConsumption( 0 );
unsigned int iBiggestConsumer ( -1 );
for( unsigned int iConsumer( 0 ); iConsumer < iNbConsumers; ++iConsumer )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment