Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
590 B
10
Indexable
Never
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    
    int sisi[n];
    int luas[n];
    
    for (int i = 0; i < n; i++)
    {
        cin >> sisi[i];
        
        luas[i] = sisi[i] * sisi[i];
    }
    
    int luasGanjil[n];
    
    for (int i = 0; i < n; i++)
    {
        if (luas[i] % 2 != 0 && luas[i] % 3 == 0)
        {
            luasGanjil[i] = luas[i];
            cout << luasGanjil[i] << endl;
        }  
    }
    
    int len = sizeof(luasGanjil) / sizeof(luasGanjil[0]);
    cout << len << endl;
    
    
    
    return 0;
}