SUBMISSION+YU+CHUAN

//#include
 * Challenge 1:|

using namespace std;

int arraysize=10; int main{// declare values of the table int tables[arraysize]; tables[0]=88; tables[1]=44; tables[2]=-21; tables[3]=1; tables[4]=23; tables[5]=8; tables[6]=-34; tables[7]=42; int max=tables[0]; int min=tables[1]; int total=0; int count=0; for(int i=0;i-999999999){ int number=tables[i]; count++; total+=number; if(number>max){ max=number; } if(number0;remaining--){ for(int i=0;i<remaining;i++){ temp=numbers[i+1]; numbers[i+1]=numbers[i]; numbers[i]=temp; //for(int i=0;i<count;i++){// int number=numbers[i]; //printf("%i ",number);// } } } for(int i=0;i<count;i++){ int number=numbers[i]; printf("%i ",number); } printf("\n"); //get numbers int check=0; printf("Enter a number to check for its ocurrence:"); scanf("%d",&check); while(check){ int occur=0; for(int i=0;i<count;i++){ int number=numbers[i]; if(number==check){ occur++; } } printf("The number %i",check); printf(" occurred %i time(s).\n",occur); check=0; printf("Enter another number to check for its ocurrence:"); scanf("%d",&check); } return 0; }


 * Challenge 2|//


 * 1) include

using namespace std;

int arraysize=5; int main{ //declare values of the table char tables[arraysize]; tables[0]='x'; tables[1]='k'; tables[2]='C'; tables[3]='d'; tables[4]='r'; int count=0; for(int i=0;i<=arraysize;i++){ char letter=tables[i]; count++; printf("%c ",letter); }   char letters[count]; for(int i=0;i<count;i++){ letters[i]=tables[i]; }   printf("\n"); char temp; bool swapped=true; while(swapped){ swapped=false; for(int i=0;i<=count;i++){ if(letters[i+1]<letters[i]&&letters[i+1]){ temp=letters[i+1]; letters[i+1]=letters[i]; letters[i]=temp; swapped=true; }           char letter=letters[i]; printf("%c ",letter); }   printf("\n"); }   return 0; }//