![](https://rs.olm.vn/images/avt/0.png?1311)
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long a[50],i,n,t;
int main()
{
cin>>n;
for (i=1; i<=n; i++)
{
cin>>a[i];
if (a[i]<0 || a[i]>10) cin>>a[i];
}
for (i=1; i<=n; i++) cout<<a[i]<<" ";
cout<<endl;
t=0;
for (i=1; i<=n; i++) t=t+a[i];
cout<<t;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
1:
uses crt;
const fi='songuyen.doc';
var i:integer;
f1:text;
begin
clrscr;
assign(f1,fi); rewrite(f1);
for i:=1 to 10 do write(f1,i:4);
close(f1);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Bài 1:
#include <bits/stdc++.h>
using namespace std;
long long x,i,n,t,k;
int main()
{
cin>>n>>k;
t=0;
for (i=1; i<=n; i++)
{
cin>>x;
if (x%k==0) t=t+x;
}
cout<<t;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
Bài 2:
#include <bits/stdc++.h>
using namespace std;
long long n,i,a[1000],x;
int main()
{
freopen("bai2.inp","r",stdin);
freopen("bai2.out","w",stdout);
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++)
if (a[i]%2==0)
{
x=a[i];
break;
}
cout<<x<<endl;
for (i=1; i<=n; i++)
if (a[i]==x) cout<<i<<" ";
return 0;
}
cứu iem với 🥲😭😭