One, problem and code
/ * file name: 123.cpp * Creator: Liu Zhishan * Completion date: 2016 May 9th * Version number: v1.0 * Description of the task and Solution Method Section: * Input Description: * Problem Description: No * program output: Array b array C * Problem analysis: slightly * Algorithm design: Slightly */ #include <iostream>using namespace Std;int Main () {int a[10],b[10],c[10],i,j=0,k=0;cout<< "Please enter 10 number:"; for (i=0;i<10;i++) cin>>a[i];for (i=0;i< 10;i++) {if (a[i]%2!=0) {b[j]=a[i];j++;} else{c[k]=a[i];k++;}} cout<< "Array B is:", for (i=0;i<j;i++) cout<<b[i]<< "";cout<<endl;cout<< "Array C is:"; for (i=0 ; i<k;i++) cout<<c[i]<< ""; Cout<<endl;return 0;}
Second, the results of the operation
Third, experience
This is an array of program editing, because there is no thorough knowledge of the array, so written very slowly, after class must grasp the array, do not leave regrets.
Iv. Summary of Knowledge points
Serious reading, combined with examples, to master the editor of the array, there are errors carefully found, slowly corrected.
C + + experiment five-array separation