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.

20 tháng 9 2015

c/ 1 = 1^2 +0;

    5 = 2^2 + 1;

   11= 3^2 + 3 .....

=> Số thứ 123 = 123^2 + 122 = 15.251

21 tháng 6 2018

a? n? đ? giải thích ra cho ngt hiểu

uses crt;

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

n,i,max,min,t:integer;

begin

clrscr;

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

for i:=1 to n do

begin

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

end;

max:=a[1];

for i:=1 to n do 

  if max<a[i] then max:=a[i];

min:=a[1];

for i:=1 to n do 

  if min>a[i] then min:=a[i];

t:=0;

for i:=1 to n do 

  t:=t+a[i];

writeln('Gia tri lon nhat la: ',max);

writeln('Gia tri nho nhat la: ',min);

writeln('Trung binh cua day so la: ',t/n:4:2);

readln;

end.

uses crt;

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

i,n,dem,kt,t:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

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

end;

dem:=0;

for i:=1 to n do 

  if a[i] mod 3=0 then inc(dem);

t:=abs(a[2]-a[1]);

kt:=0;

for i:=1 to n do 

if t<>abs(a[i]-a[i-1]) then 

begin

kt:=1;

break;

end;

if kt=0 then writeln('Day la cap so cong')

else writeln('Day khong la cap so cong');

readln;

end.