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.

25 tháng 10 2021

Câu 31: 

#include <bits/stdc++.h>

using namespace std;

long long n,i,x,dem;

int main()

{

cin>>n;

dem=0;

for (i=1; i<=n; i++)

{

cin>>x;

if (30%x==0) dem++;

}

cout<<dem;

return 0;

}

14 tháng 11 2021

Câu 2: 

#include <bits/stdc++.h>

using namespace std;

long long n,i,x,nn;

int main()

{

cin>>n>>x;

nn=x;

for (i=2; i<=n; i++)

{

cin>>x;

nn=min(nn,x);

}

cout<<nn;

return 0;

}

11 tháng 10 2021

#include <bits/stdc++.h>

using namespace std;

int main()

{

long long n,i,t;

cin>>n;

t=0;

for (i=1; i<=n; i++)

t=t+i;

cout<<t;

return 0;

}

22 tháng 11 2021

A nhé

 

27 tháng 12 2021

Câu 59:B

Câu 63: A

27 tháng 12 2021

cho mình xem đáp án câu 66 67 ạ

31 tháng 10 2021

#include <bits/stdc++.h>

using namespace std;

long long x,n,i,t,s;

int main()

{

cin>>n;

t=0;

s=1;

for (i=1; i<=n; i++)

{

cin>>x;

if (x%3==0) t=t+x;

else s=s*x;

}

cout<<t<<" "<<s;

return 0;

}

11 tháng 11 2021

Câu 1: B

11 tháng 10 2021

uses crt;

var a:array[1..100] of integer;

i,n,d,tong :integer;

begin

clrscr;

d:=0;

tong:=0;

readln(n);

for i:=1 to n do

readln(a[i]);

end;

for i:=1 to n do

if (a[i]>0) then begin

d:=d+1;

if d=1 then begin writeln('trong day co so nguyen duong '); write(' vi tri cua cac so duong ',i); end

else

begin

tong:=tong+a[i];

write(' ',i);

end;

end

else if ((i=n)and(d=0)) then write(' khong co so duong');

writeln;

writeln(' tong so luong so nguyen duong trong day so: ',d);

writeln(' ton cac so nguyen duong: ',tong);

readln;

end.