# data[].attributes.body
##  include < stdio.h>
??? < iostream>
using ??? std;
int mang??? ,dem,tong;
??? tb;
??? main 0
{
for ( int i= ??? ; i<10 ; i++)
{
cout << " Nhap phan tu thu" <<i<<":";
???>> mang[???];
}
dem=??? ;tong=0 ;
???( i=0;i<10;i???)
{
if ????%2!=0 && i???/2==0
dem=dem+1
tong=??? +mang [i];
}
???=tong/dem ;
cout<<'' Trung binh cong cac so le o vi tri chan='' <<tb;
return 0;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std;
int a[10],avg_even=0,avg_odd=0,i,even,odd;

int main(){
for(i = 0 ; i < 10; i++){ cin>>a[i]; }
for(i = 0 ; i < 10; i++){
if (i % 2 == 0 && a[i] % 2 !=0) {
avg_even+=a[i];
even++;
}
else{
avg_odd+=a[i];
odd++;
}
}
cout<<avg_even/even<<" "<<avg_odd/odd;
return 0;
}

# data[].attributes.body
#include <stdio.h>
#include <iostream>
using namespace std;

int main()
{
int nums[10],i,avg = 0,c = 0;
for(i = 0;i<10;i++)
{
cout<<"Nhap so nguyen thu "<<i+1<<" : ";
cin>>nums[i];
}
for(i=0;i<10;i+=2)
{
if (nums[i]%2 != 0)
{
avg += nums[i];
c++;
}
}
avg = avg / c;
cout<<"Trung binh cong cua cac so co gia tri le o vi tri chan : "<<avg;
}

# data[].attributes.body
#include <stdio.h>
#include <iostream>
using namespace std;

int main()
{
int Mang[10], a=0, dem = 0 ;

for (int i=1; i <=10; i++){
cout <<" Nhap vao phan tu thu " << i << ": ";
cin >> Mang[i];
}

for (int i=1; i <=10; i++){
if ((Mang[i]%2 != 0)&&(i%2 == 0)){
a=a + Mang[i];
dem = dem + 1;
}
}

float b = a / dem;
cout << "Trung binh cong cac so co gia tri le o vi tri chan la " << b;
return 0;
}

# data[].attributes.body
Cin<< int
using namespace std
int
out<iostream>

# data[].attributes.body
#include <iostream>
#include <stdio.h>
using namespace std;
int mang[10],i,tb;
int main()
{
cout << "nhap 10 so nguyen" << endl;
for (i=0;i<10;i++)
{
cin>> mang[i];
}
int c=0,tong=0;
for (i=0;i<10;i++)
{
if ((mang[i]%2!=0)&&(i%2==0))
{
c=c+1;
tong=tong+mang[i];
}
}

cout << "tong cac so theo dieu kien de bai la= "<<tong<< endl;
cout << "trong day gom "<<c<<" thoa yeu cau"<<endl;
tb=tong/c;
cout << "tb= "<<tb<<endl;
return 0;

}

# data[].attributes.body
#include <stdio.h>
#include <iostream>
using namespace std;

int main()
{
int nums[10],i,avg = 0,c = 0;
for(i = 0;i<10;i++)
{
cout<<"Nhap so nguyen thu "<<i+1<<" : ";
cin>>nums[i];
}
for(i=0;i<10;i+=2)
{
if (nums[i]%2 != 0)
{
avg += nums[i];
c++;
}
}
avg = avg / c;
cout<<"Trung binh cong cua cac so co gia tri le o vi tri chan : "<<avg;
}

# data[].attributes.body
#include <stdio.h>
#include <iostream>
using namespace std;
int mang[10] ,dem=0,tong=0;
Float tb;
Int main 0
{
for ( int i= 1 ; i<10 ; i++)
{
cout << " Nhap phan tu thu" <<i<<":";
cin>> mang[i];
}
dem=dem+1;tong=0 ;
for( i=0;i<10;i++)
{
if(mang[i]%2!=0 && i%/2==0)
dem=dem+1;
tong=tong +mang [i];
}
float b=tong/dem ;
cout<<'' Trung binh cong cac so le o vi tri chan='' <<tb;
return 0;
}

# data[].attributes.body
Bài 1