I. Questions and codes
/** file name: monster1.cpp* : Shaning * Completion Date: May 8 * Version number: v1.0* Description of the task and solution part: Enter 10 numbers from the keyboard in the array A, put the odd number in the array b , the even numbers are placed in the array C and then output separately. * Input Description: Enter 10 number * Problem Description: Slightly * program output: Even and odd group * problem analysis: slightly * algorithm design: Slightly */#include <iostream>using namespace Std;int main () { int a[1 0]; cout<< "Please enter 10 numbers"; for (int i=0;i<10;i++) { cin>>a[i]; } cout<< "Even for:" <<endl; for (int j=0;j<10;j++) if (a[j]%2==0) { cout<<a[j]<< ""; } cout<<endl; cout<< "Odd:" <<endl; for (int k=0;k<10;k++) if (a[k]%2!=0) { cout<<a[k]<< ""; }}Ii. Results of operation
Third, experience
Pay attention to the use of the For statement and avoid errors that are easy to make
Iv. Summary of Knowledge points
The use of the For statement, the basic idea of array problems.
C + + experiment 5-array separation