pasca...">

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.

8 tháng 7 2023

program cho_xuat;

uses
  System.SysUtils, System.Classes, System.Generics.Collections;

type
  Tsum = record
    value: Integer;
  end;

  TsumArray = array of Tsum;

function cho_xuat(N: String; M: Integer): TsumArray;
begin
  SetLength(Result, Length(N));
  for i := 0 to High(Result) do
  begin
    if N[i] >= 58 then
      Result[i].value := Result[i].value + M
    else
      Result[i].value := Result[i].value - M;
  end;
end;

var
  N, M: String;
  a: TsumArray;
begin
    readln(N, M);
    a := cho_xuat(N, M);

    WriteLn('KQ: ' + N, ' -> ' + ConvertIntToString(M) + '');
    for i := 0 to High(a) do
    begin
        WriteLn(' + ', a[i].value, ' +', );
    end;
end.

20 tháng 1 2017

o tôi xin 1 bài mẫu dạng này

28 tháng 4 2017

1/

program uoc;

uses crt;

var n,i,dem,x:word;

a:array[1..20] of longint;

begin

clrscr;

write('nhap so phan tu cua day:') ;readln(n);

while n>20 do

begin

write('nhap lai so phan tu thoa man toi da la 20 phan tu:');

readln(n);

end;

writeln('nhap cac phan tu cua mang:');

for i:=1 to n do

begin

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

end;

write('nhap so nguyen x:'); readln(x);

dem:=0;

for i:=1 to n do

if x mod a[i] =0 then

begin

dem:=dem+1;

writeln(a[i],' la uoc cua ',x);

end;

if dem=0 then writeln('khong co phan tu la uoc cua ',x)

else write('co ',dem,' phan tu la uoc cua ',x);

readln;

end.banhqua

17 tháng 10 2021

nhìn mặc áo hình như trò chơi con mực đúng hông đấy là trò giết người hả

Tl :

Khong duoc viet lung tung tren dien dang

~ H T ~

30 tháng 10 2017

k thấy rõ bạn ơi

à nó có updates kìa, bạn updates đi

bạn thử vào microsoft store xem

27 tháng 8 2017

phynit thầy giúp e với haha

25 tháng 12 2017

program bai1;

var

begin

write('Ten cua ban la ');readln(ten);

write('Nam hien tai la ');readln(nht);

write('Nhap nam sinh ');readln(ns);

write('Ban hoc lop ');readln(lop);

tuoi:=nht-ns;

writeln('Ten cua ban la ',tuoi);

readln

end.

15 tháng 7 2023

program count_days;

var

       a, b, c, x, y, z, days: integer;

function is_leap_year(year: integer): boolean;

begin

       if (year mod 4 = 0) and (year mod 100 <> 0) or (year mod 400 = 0) then

              is_leap_year := true

       else

              is_leap_year := false;

end;

function days_in_month(month, year: integer): integer;

begin

       case month of

              1, 3, 5, 7, 8, 10, 12: days_in_month := 31;

              4, 6, 9, 11: days_in_month := 30;

              2:

                     if is_leap_year(year) then

                            days_in_month := 29

                     else

                            days_in_month := 28;

       end;

end;

begin

       writeln('Nhap ngay a thang b nam c: ');

       readln(a, b, c);

       writeln('Nhap ngay x thang y cung nam c: ');

       readln(x, y, z);

       if (a > x) or ((a = x) and (b > y)) or ((a = x) and (b = y) and (c > z)) then

       begin

              writeln('Loi nhap lieu!');

              halt;

       end;

       days := days_in_month(b, c) - a + 1;

       while (b < y) or ((b = y) and (c < z)) do

       begin

              a := 1;

              b := b + 1;

              if b > 12 then

              begin

                     b := 1;

                     c := c + 1;

              end;

              days := days + days_in_month(b, c);

       end;

       days := days - (days_in_month(y, z) - x);

       writeln('So ngay giua hai ngay la: ', days);

end.

Dữ liệu ra: số ngày tương ứng