Created
December 3, 2018 02:57
-
-
Save rkhang7/5f5536de0fa9506d0c4b892146c8acd6 to your computer and use it in GitHub Desktop.
Sử dụng lại bài 29. Viết chương trình hiển thị các phần tử của mảng một chiều.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
int main() | |
{ | |
int n; | |
printf("Nhap so phan tu cua mang: ");scanf("%d", &n); | |
int a[n]; | |
for(int i=0;i<n;i++) | |
{ | |
printf("a[%d]=",i);scanf("%d", &a[i]); | |
} | |
printf("Cac phan tu cua mang bao gom: "); | |
for(int i=0;i<n;i++) | |
printf("%d\t",a[i]); | |
getch(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment