Zhangchu's Seventh time assignment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.