Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- const int MAX = 100 ;
- int i;
- long long x , y=0;
- void NhapMang(long long a[], int n){
- for(i = 0;i < n; ++i){
- scanf("\n%lld", &a[i]);
- }
- }
- void XuatMang(long long a[], int n){
- for(i = 0;i < n; ++i){
- int check;
- while(a[i]>0) {
- check = 0;
- x = a[i]%10;
- a[i] = a[i]/10;
- if(x!=0 && x!=6 && x!=8){
- check = 1;
- }
- }
- if (check == 1) {
- printf("\n%s", "NO");
- }
- if (check == 0) {
- printf("\n%s", "YES");
- }
- }
- }
- int main()
- {
- long long arr[MAX];
- int n;
- do{
- scanf("%d", &n);
- if(n <= 0 || n > MAX){
- return 0;
- }
- }while(n <= 0 || n > MAX);
- NhapMang(arr, n);
- XuatMang(arr, n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment