The 14th week on the Machine practice project of the two-dimensional array (1)

Source: Internet
Author: User

Questions and codes

/* Copyright (c) 2014, Yantai University School of Computer * All rights reserved. * File name: Test.cpp *:    Simbin * Completion Date: November 27, 2014 * Version number: v1.0 * * Problem Description: First output array elements by row order. * Input Description: The latter two column elements. * Program output: array element; */#include <iostream>using namespace Std;int main () {    int i,x,y;    int a[5][4]= {{0,1},{4,5},{8,9},{12,13},{16,17}};    cout<< "Please enter 10 integers:" <<endl;    for (x=0; x<5; x + +) for        (y=2; y<4; y++)            cin>>a[x][y];    The value in the cout<< "array is:" <<endl;    for (x=0; x<5; x + +)    {        cout<< "" <<x<< "line:";        for (y=0; y<4; y++)            cout<<a[x][y]<< "  ";        cout<<endl;    }    return 0;}


Operation Result:,

Learning sentiment: Why the teacher can row so neat .....

The 14th week on the Machine practice project of the two-dimensional array (1)

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.