# data[].attributes.body
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,maxso,i,chiso;
int a[200];
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"a["<<i<<"]= ";
cin>>a[i];
}
for(i=1;i<=n;i++)  cout<<a[i]<<" ";
maxso=a[1];
for(i=2;i<=n;i++)
if(maxso<a[i]) maxso=a[i];
cout<<"phan tu lon nhat: "<<maxso<<endl;
maxso=a[1]; chiso=1;
for(i=2;i<=n;i++)
if(maxso<a[i])
{
maxso=a[i];
chiso=i;
}
cout<<"chi so cua phan tu lon nhat: "<<chiso;
}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;

int main()
{
int n,i,a[100],maxso=a[1],chiso=0,minso=a[1];
cin>>n;
for (i=1;i<=n;i++) {
cout<<"a [ "<<i<<" ] = ";
cin>>a[i]; }
for (i=1;i<=n;i++)
cout<<a[i]<<" ";
for (i=2;i<=n;i++)
if (a[i]>maxso) {maxso=a[i]; chiso=i;}
cout<<"chi so phan tu lon nhat la: "<<chiso<<endl;
cout<<"gia tri cua phan tu lon nhat la: "<<maxso<<endl;
return 0;
}

# data[].attributes.body
bai2
#include <iostream>

using namespace std;

int main()
{
int n,a[100],i,chiso,maxso;
cin>>n;
for(int i=0;i<n;i++) {
cout<<"a["<<i<<"]=";
cin>>a[i];
}
maxso=a[0];
for(i=1;i<n;i++)
if(maxso<a[i])
{
maxso=a[i];
chiso=i;
}
cout<<"chi so cua phan tu co gia tri lon nhat la:"<<chiso<<endl;
cout<<"phan tu co gia tri lon nhat la:"<<maxso;
return 0;
}

# data[].attributes.body
#include <iostream>

using namespace std;

int main()
{
int n; cin>>n;
int k; cin>>k;
int a[n];
for (int i=1;i<=n;i++)
{
cout<<"[a"<<i<<"]="; cin>>a[i];
}
int s=0;
for (int i=1;i<=n;i++)
if (a[i]%k==0) s=s+a[i];
cout<<"Tong cac boi cua k la:<<s<<endl;
return 0;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a[100],maxso,chiso=0,max;
cin>>n;
for (int i=1; i<=n; i++)
{
cout<<"a["<<i<<"]=";
cin>>a[i];
}
maxso=a[1];
for(int i=2;i<=n;i++)
if(max< a[i])    max=a[i];
cout<<"phan tu lon nhat: "<<max<<endl;

maxso=a[1]; chiso=1;
for(int i=2;i<=n;i++)
if(maxso<a[i])
{
maxso=a[i];
chiso=i;
}
cout<<"chi so lon nhat: "<<chiso;
}

# data[].attributes.body
bai1
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a[100],k,s;
cin>>n>>k;
for (int i=1; i<=n; i++)
{
cout<<"a["<<i<<"]=";
cin>>a[i];
}
for(int i=1;i<=n;i++)
if(a[i]%k==0) s+=a[i];
cout<<"tong cac boi cua k : "<<s<<endl;
}

# data[].attributes.body
bai1
#include <iostream>

using namespace std;

int main()
{
int n,a[100],i,S,k;
cin>>n;
cin>>k;
for(int i=1;i<=n;i++) {
cout<<"a["<<i<<"]=";
cin>>a[i];
}
for(int i=1;i<=n;i++)
if(a[i]%k==0) S=S+a[i];
cout<<"tong cac phan tu nhan k lam uoc so la:"<<S<<endl;
return 0;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,i,k,a[100],s=0;
cout<<"n la: ";
cin>>n;
cout<<"so nguyen duong k la: ";
cin>>k;
for (i=1;i<=n;i++) {
cout<<"a[ "<<i<<" ] = ";
cin>>a[i];}
for (i=1;i<=n;i++)
cout<<a[i]<<" ";
for (i=1;i<=n;i++)
if (a[i]%k==0) s=s+a[i];
cout<<"tong = "<<s;
return 0;
}