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.
Bài 1:
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(min);
readln;
end.
Bài 2:
uses crt;
var a:array[1..100]of integer;
i,n,max:integer;
begin
clrscr;
write('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];
writeln(max);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,p;
int main()
{
cin>>a>>b>>c;
p=a+b+c;
cout<<fixed<<setprecision(2)<<p;
return 0;
}
a) n mod 3=0;
b) m mod 7<>0;
c) y<=100;
d) (a+b>c) and (b+c>a) and (a+c>b);
e) ((a>0) and (b>0)) or ((a<0) and (b<0));
f) a/b=3/4;
g) ((a>5) and (b+c=10)) or ((a<=5) and (b+c=-20));
h) (m=1) or (m=3) or (m=5) or (m=7) or (m=8);
program tin_hoc;
uses crt;
var b,c,d,A:realn;
begin
clrscr;
write('nhap so b');readln(b);
write('nhap so c');readln(c);
write('nhap so d');readln(d);
A:=(b+c)/d;
writeln('A=');
end.
uses crt;
var a,b,c,d,tu,msc,ucln,i:integer;
begin
clrscr;
write('Nhap tu cua phan so thu 1:'); readln(a);
repeat
write('Nhap mau cua phan so thu 1:'); readln(b);
until b<>0;
write('Nhap tu cua phan so thu 2:'); readln(c);
repeat
write('Nhap mau cua phan so thu 2:'); readln(d);
until d<>0;
msc:=b*d;
tu:=a*d+b*c;
ucln:=1;
if msc<tu then
begin
for i:=1 to msc do
if (msc mod i=0) and (tu mod i=0) then
begin
if ucln<i then ucln:=i;
end;
end;
if msc=tu then ucln:=tu;
if msc>tu then
begin
for i:=1 to tu do
if (msc mod i=0) and (tu mod i=0) then
begin
if ucln<i then ucln:=i;
end;
end;
if (msc div ucln)=1 then writeln(a,'/',b,'+',c,'/',d,'=',tu div ucln)
else writeln(a,'/',b,'+',c,'/',d,'=',tu div ucln,'/',msc div ucln);
readln;
end.
program hieups; var a,b,c,d,msc: longint; function UCLN(a,b: longint): longint; var r: longint; begin r := a mod b; while r <> 0 do begin r := a mod b; a := b; b := r; end; UCLN := a; end; procedure Output; var t: longint; begin if (a mod msc = 0) then write(a div msc) else begin t := UCLN(a,msc); a := a div t; msc := msc div t; if msc < 0 then write(-a,'/',abs(msc)) else write(a,'/',msc); end; end; begin readln(a,b,c,d); msc := b * d; a := (a * d) - (c * b); Output; end.