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.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long a,b;
//chuongtrinhcon
long long gcd(long long a,long long b)
{
if (b==0) return(a);
return gcd(b,a%b);
}
//chuongtrinhchinh
int main()
{
freopen("songuyen.inp","r",stdin);
cin>>a>>b;
cout<<gcd(a,b);
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
const fi='baitap.inp';
var f1:text;
a,b,i,t:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
readln(f1,a,b);
t:=0;
for i:=a to b do
if i mod 2=0 then t:=t+i;
writeln(t);
close(f1);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long i,a[100],n;
int main()
{
freopen("songuyen.txt","r",stdin);
n=20;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++) cout<<a[i]<<" ";
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
const fi='songuyen.inp';
fo='songuyen2.out';
var a:array[1..100]of integer;
i,n,t1:integer;
f1,f2:text;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,n);
for i:=1 to n do readln(f1,a[i]);
t1:=0;
for i:=1 to n do if a[i] mod 2<>0 then t1:=t1+a[i];
writeln(t1);
writeln(f2,t1);
for i:=1 to n do
if a[i] mod 2<>0 then write(a[i]:4);
close(f1);
close(f2);
readln;
end.
uses crt;
const fi='baitap.inp';
var f1:text;
a,b,c,d,ln:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
readln(f1,a,b);
readln(f1,c);
readln(f1,d);
ln:=a;
if ln<b then ln:=b;
if ln<c then ln:=c;
if ln<d then ln:=d;
writeln(ln);
close(f1);
readln;
end.