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.
const fo='int.txt';
fo='out.txt';
var f1,f2:text;
m,n:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,m);
readln(f1,n);
writeln(f2,m+n);
close(f1);
close(f2);
end.
uses crt;
const fi='dst.txt';
var f1:text;
a,b:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
readln(f1,a);
readln(f1,b);
writeln('Tong cua hai so la: ',a+b);
writeln('Gia tri tuyet doi hieu hai so la: ',abs(a-b));
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
freopen("ab.inp","r",stdin);
freopen("ab.out","w",stdout);
cin>>a>>b;
cout<<fixed<<setprecision(1)<<a+b<<endl;
cout<<fixed<<setprecision(1)<<a-b;
return 0;
}
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.
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.
mình ghi dư cái số 4 bên phần BAI7.INP nha mn
#include <bits/stdc++.h>
using namespace std;
long long a,b;
double tb;
int main()
{
freopen("dulieu.inp","r",stdin);
freopen("ketqua.out","w",stdout);
cin>>a>>b;
cout<<a<<" "<<b;
cout<<fixed<<setprecision(2)<<(a*1.0+b*1.0)/(2*1.0);
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a[1000],n,i;
int main()
{
freopen("so.inp","r",stdin);
freopen("so.out","w",stdout);
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++)
if (a[i]%2==0) cout<<a[i]<<" ";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a[1000],i,n,j;
bool kt;
int main()
{
freopen("nguyento.inp","r",stdin);
freopen("nguyento.out","w",stdout);
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++)
if (a[i]>1)
{
kt=true;
for (j=2; j*j<=a[i]; j++)
if (a[i]%j==0) kt=false;
if (kt==true) cout<<a[i]<<" ";
}
return 0;
}
Program HOC24;
const fi='UCLN.inp';
fo='UCLN.ou';
var a,b,c,d,e,f: integer;
t: longint;
function ucln(x,y: integer): integer;
var tg: integer;
begin
while y<>0 do
begin
tg:=x mod y;
x:=y;
y:=tg;
end;
ucln:=x;
end;
f: text;
procedure ip;
begin
assign(f,fi);
reset(f);
readln(f,a,b);
readln(f,c,d);
readln(f,e,f);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
write(f,ucln(a,b)+ucln(c,d)+ucln(e,f));
close(f);
end;
begin
ip;
out;
end.