Nhập mảng các số nguyên

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace bài_1_làm_quen_c_xáp { class Program { static void Main(string[] args) {////// c sáp int[] a = new int[6];// khai báo mảng a int n; Console.Write("\nMoi ban nhap vao so luong phan tu: ");// inra dòng thông báo n=int.Parse(Console.ReadLine());// nhập n; for(int i=0;i<n;i++) { Console.Write("\nMoi ban nhap vao phan tu thu: a[{0}]", i);// in ta giống như printf a[i] = int.Parse(Console.ReadLine());// nhập phần tử thứ a[i]; } for (int i = 0; i < n; i++) { Console.Write(a[i] + " "); } Console.ReadKey();// lệnh giống như system("pause"); ben c++ } } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.