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.

28 tháng 11 2016

Tính cả đầu bài là 22 số 

ko tính đầu bài là 21 số

Nhấn 8 f3 là cứ vô tư mà đếm đêê

28 tháng 11 2016

có 21 số 8

28 tháng 1 2023

program Xau219;
uses crt;
Var S:String;
    dem, max, i:Byte
begin
  clrscr;
  Write ('Nhap xau:'); Readln (S);
  max:=0; dem:=0; S:=S+'';
  For i:=1 to Length (S) do
  begin
     If S[i] ='8' then dem:=dem+1
     else
       If max<them then
          begin max:=dem; dem:=0; end;
  end;
  Writeln('Ket qua:'max);
  readln;
end.

28 tháng 1 2023

Làm bằng pos đc ko ạ

uses crt;

var s:string;

i,d,dem,dem1,kt:integer;

begin

clrscr;

write('Nhap xau S:'); readln(s);

d:=length(s);

dem:=0;

for i:=1 to d do 

  if st[i] in ['0'..'9'] then inc(dem);

writeln('So ki tu la chu so la: ',dem);

dem1:=0;

for i:=1 to d do 

  if (st[i] in ['A'..'Z']) or (st[i] in ['a'..'z']) then inc(dem1);

writeln('So ki tu la chu cai la: ',dem1);

write('Xau sau khi xoa ki tu trang la: ');

for i:=1 to d do 

if st[i]<>#32 then write(st[i]);

writeln;

kt:=0;

for i:=1 to d do 

 if st[i]<>st[d-i+1] then kt:=1;

if kt=0 then writeln('Xau doi xung')

else writeln('Xau khong doi xung');

readln;

end.

uses crt;

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

i,n,dem,dem1,dem2,t:integer;

s:real;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to n do 

begin

repeat

write('A[',i,']='); readln(a[i]);

until a[i]>0;

end;

for i:=1 to n do 

  write(a[i]:4);

writeln;

dem:=0;

for i:=1 to n do

  if a[i]>10 then inc(dem);

writeln('So phan tu lon hon 10 la: ',dem);

dem1:=0;

dem2:=0;

for i:=1 to n do 

begin

if a[i] mod 2=0 then inc(dem1)

else inc(dem2);

end;

writeln('So luong so chan la: ',dem1);

writeln('So luong so le la: ',dem2);

t:=0;

s:=1;

for i:=1 to n do 

  begin

if (i mod 2=0) and (a[i] mod 2<>1) then t:=t+a[i];

if (i mod 2=1) and (a[i] mod 2=0) then s:=s*a[i];

end;

writeln('Tong cac so o vi tri chan co gia tri le la: ',t);

writeln('Tich cac so o vi tri le co gia tri chan la: ',s:4:2);

writeln('Cac so le la: ');

for i:=1 to n do 

  if a[i] mod 2<>0 then write(a[i]:4);

writeln;

writeln('Cac so chan va lon hon 10 la: ');

for i:=1 to n do 

  if (a[i] mod 2=0) and (a[i]>10) then write(a[i]:4);

readln;

end.

18 tháng 2 2021

Thank you

24 tháng 10 2015

tớ nhầm 

cơ sở các số là  ( 10292092 - 88 ) : 1 + 1 =

cậu tự tính cho đấy nhé

#include <bits/stdc++.h>

using namespace std;

long long x,n,i,dem;

int main()

{

cin>>n;

dem=0;

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

{

cin>>x;

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

}

cout<<dem;

return 0;

}

18 tháng 3 2022

python hay pascal vậy bạn 

24 tháng 10 2021

#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 (x%2==0) dem++;

}

cout<<dem;

return 0;

}

Câu 2: 

a) Mô tả thuật toán

-Bước 1: Nhập n và nhập dãy số

-Bước 2: dem←0; i←1; t←0;

-Bước 3: Nếu a[i] mod 2=0 thì dem←dem+1 và t←t+a[i];

-Bước 4: i←i+1;

-Bước 5: Nếu i<=n thì quay lại bước 3

-Bước 6: Xuất t và dem

-Bước 7: Kết thúc

Câu 2: 

b) uses crt;

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

i,n,t,dem:integer;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to n do 

begin

write('A[',i,']='); readln(a[i]);

end;

t:=0;

dem:=0;

for i:=1 to n do 

 if a[i] mod 2=0 then 

begin

t:=t+a[i];

inc(dem);

end;

writeln('So so chan la: ',dem);

writeln('Tong cac so chan la: ',t);

readln;

end.

9 tháng 10 2023

Rất nhiều số :)

 

9 tháng 10 2023

Ko đếm dc