One: Questions and codes
/ * file name: Cy.cpp *: Chen Ronggui * Completion Date: May 7, 2016 * Version number: v1.0 * Method and description of task solving: * Input Description: * Problem Description: Enter 10 numbers from the keyboard in the array A, put the odd number in the array B, and even put in the array c after the output. * Program output: * Problem Analysis: * Algorithm design: * /#include <iostream>using namespace Std;int main () { const int i =10; int a[10],b[i],c[i],j=0; cout<< "Please enter 10 number:" <<endl; for (j=0;j<10;j++) cin>>a[j]; for (j=0;j<10;j++) { if (a[j]%2==0) { b[i]=a[j]; cout<< "even:" <<B[i]<< "\ n"; } else { c[i]=a[j]; cout<< "Odd:" <<C[i]; } } return 0;}
Second: Running results
Three: Experience
The array is difficult to do several times did not write right, but slowly master, 1.1 changes can be successful.
IV: Summary of Knowledge points
C + + experiment 5--array separation