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.

uses crt;

const fi='kiemtra.txt';

var f1:text;

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

min,n,i:integer;

{----------------chuong-trinh-con-------------------}

function nn(x,y:integer):integer;

begin

if x<y then nn:=x

else nn:=y;

end;

{-----------------chuong-trinh-chinh-----------------}

begin

clrscr;

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

for i:=1 to n do 

  begin

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

end;

min:=nn(a[1],a[2]);

for i:=3 to n do 

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

writeln(min);

readln;

end.

Mình xin sửa lại một chút:

uses crt;

const fi='kiemtra.txt';

var f1:text;

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

min,n,i:integer;

{----------------chuong-trinh-con-------------------}

function nn(x,y:integer):integer;

begin

if x<y then nn:=x

else nn:=y;

end;

{-----------------chuong-trinh-chinh-----------------}

begin

clrscr;

assign(f1,fi); reset(f1);

readln(f1,n);

for i:=1 to n do 

  read(f1,a[i]);

min:=nn(a[1],a[2]);

for i:=3 to n do 

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

writeln(min);

readln;

end.

uses crt;

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

min,n,i:integer;

{----------------chuong-trinh-con-------------------}

function nn(x,y:integer):integer;

begin

if x<y then nn:=x

else nn:=y;

end;

{-----------------chuong-trinh-chinh-----------------}

begin

clrscr;

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

for i:=1 to n do 

  begin

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

end;

min:=nn(a[1],a[2]);

for i:=3 to n do 

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

writeln(min);

readln;

end.

uses crt;

const fi='kiemtra.txt';

var f1:text;

a,b,c:integer;

begin

clrscr;

assign(f1,fi); reset(f1);

readln(f1,a);

readln(f1,b);

readln(f1,c);

writeln((a+b)*(a+c)*(c+b));

close(f1);

readln;

end.

19 tháng 4 2021

E cảm ơn ạ

uses crt;

const fi='kiemtra.txt';

var f1:text;

a,b,c:integer;

begin

clrscr;

assign(f1,fi); reset(f1);

readln(f1,a,b,c);

writeln((a+b)*(a+c)*(b+c));

close(f1);

readln;

end.

uses crt;

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

i,n,min:integer;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i]);

min:=a[1];

for i:=1 to n do 

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

writeln(min);

readln;

end.

#include <bits/stdc++.h>

using namespace std;

string st,d;

int main()

{

freopen("dkt.inp","r",stdin);

cin>>st;

d=st.length();

for (int i=0; i<=d-1; i++)

st[i]-=32;

cout<<st;

return 0;

}

uses crt;

var a,b,c,nn:integer;

//chuongtrinhcon

function min(var x,y:integer):integer;

begin

if x<y then min:=x

else min:=y;

end;

//chuongtrinhchinh

begin

clrscr;

readln(a,b,c);

nn=min(a,b);

nn=min(nn,c);

writeln(nn);

readln;

end.

25 tháng 7 2021

cau 1:

uses crt;

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

n,i,min: integer;

begin

readln(n);

for i:=1 to n do

readln(a[i]);

min:=a[1];

for i:=2 to n do

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

writeln(a[i]);

readln;

end.

cau 2:

uses crt;

g:text;

s:string;

const fo='CHUSO.TXT';

begin

assign(g,fo);

rewrite(g);

readln(s);

for i:=1 to length(s) do

if not((s[i] in ['a'..'z'])and(s[i] in ['A'..'Z])) then delete(s,i,1);

writeln(g,s);

end.

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<min(a,b);

return 0;

}