Created
March 6, 2014 23:42
-
-
Save ddribin/9402109 to your computer and use it in GitHub Desktop.
Spam Code
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 <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