1. The first question is later changed
2. The second question
#include <stdio.h>intMain ()//Reverse Array Store output{ inta[Ten],b[Ten],m,n,i; printf ("do you want to enter a few (less than 10) numbers? \ n"); scanf ("%d",&N); printf ("Please enter this%d integer \ n", N); for(i=0; i<n;i++) scanf ("%d",&A[i]); for(i=0; i<n;i++) {B[i]=a[n-i-1]; printf ("%d", B[i]); }return 0;}
3. Question Three
#include <stdio.h>intMain ()//Common Elements{ intm,n,u,v,i,j; printf ("How many are there in the first group? \ n"); scanf ("%d",&m); inta[Ten]; printf ("Please enter these numbers: \ n"); for(i=0; i<m;i++) scanf ("%d",&A[i]); printf ("How many are there in the second group? \ n"); scanf ("%d",&N); printf ("Please enter these numbers: \ n"); intb[Ten]; for(j=0; j<n;j++) scanf ("%d",&B[j]); for(i=0; i<m;i++) { for(j=0; j<n;j++) if(a[i]==B[j]) printf ("total elements are%d", A[i]); }return 0; }
4. Question Fourth
#include <stdio.h>intAintm) { if(m==0) return 0; Elseprintf ("%d", m%Ten);returnA (m/Ten); }intMain () {intC; printf ("Please enter an integer:"); scanf ("%d",&c); printf ("the reverse-order output is:"); A (c); return 0;}
This feeling is a bit difficult, most of them because their class is not serious enough, even they have already felt that there is no beginning of the vigor, resulting in this small error constantly situation, such as forget to add return or scanf after the &. Class is also a muddle, not the beginning of serious. So it is time to adjust the state of mind, correct their learning attitude, play when good fun, learning time to learn, distinguish between primary and secondary, and know when to do what.
Zhangchu's Seventh time assignment