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='doc.inp';
var f1:text;
n,i:integer;
a:array[1..255]of integer;
begin
clrscr;
assign(f1,fi); reset(f1);
readln(f1,n);
for i:=1 to n do
read(f1,a[i]);
min:=a[1];
for i:=1 to n do
if min>=a[i] then min:=a[i];
writeln(min);
close(f1);
readln;
end.
Viết Chương trình diện tích tứ giác ABCD khi biết tọa độ Điểm A(xA,yA); B(xB,yB); C(xC,yC); D(xD,yD)
2:
#include <bits/stdc++.h>
using namespace std;
double a,b,c,p,s;
int main()
{
cin>>a>>b>>c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s;
return 0;
}
Câu 1:
#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
cin>>n;
int t=0;
while (n>0)
{
int x=n%10;
t=t+x;
n=n/10;
}
cout<<t;
return 0;
}