![](https://rs.olm.vn/images/avt/0.png?1311)
K
Khách
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)
Các câu hỏi dưới đây có thể giống với câu hỏi trên
![](https://rs.olm.vn/images/avt/0.png?1311)
14 tháng 11 2021
2:
#include <bits/stdc++.h>
using namespace std;
long long a[100],n,i,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)
KV
3 tháng 5 2023
Câu 3
Var st:string;
i,d:integer;
Begin
Write('Nhap xau ky tu ');readln(st);
For i:=1 to length(st) do
If st[i] in ['0'..'9'] then d:=d+1;
Write('Co ',d,' ky tu so');
Readln
End.
KV
3 tháng 5 2023
Câu 4
Var a:array[1..1000] of integer;
i,n:integer;
Begin
Write('n = ');readln(n);
For i:=1 to n do
Begin
Write('Nhap so thu ',i);readln(a[i]);
End;
Write('Cac so chia het cho 3 hoac 5 la: ');
for i:=1 to n do
If (a[i] mod 3 = 0) or (a[i] mod 5 = 0) then write(a[i]:8);
Readln
End.
1D
0
![](https://rs.olm.vn/images/avt/0.png?1311)
TT
1
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)