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.
câu 1
program hieu_thuong;
uses crt;
var a,b,h,t:real;
begin
write('nhap so a:');readln(a);
write('nhap so b:');readln(b);
if a>=b then h:=a-b else h:=b-a;
t:=a/b;
writeln('hieu cua hai so ',a,'',b,' la ',h);
writeln('thuong cua hai so ',a,'',b,' la ',t);
readln;
end.
câu 2
program chuvi_dientich;
uses crt;
var cv,dt,d,r:real;
begin
write('nhap chieu dai d:');readln(d);
write('nhap chieu rong r:');readln(r);
cv:=( d + r ) * 2 ;
dt:= d * r ;
writeln('chu vi thua ruong la : ',cv);
writeln('dien tich thua ruong la : ',dt);
readln;
end.
uses crt;
var a,b:int64;
begin
clrscr;
readln(a,b);
writeln(a+b);
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
if a[i] mod 2=0 then write(a[i]:4);
readln;
end.
uses crt;
var a:array[1..1000000] of longint;
n,i:longint;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': '); readln(a[i]);
end;
write('Cac so chan: ');
for i:=1 to n do if a[i] mod 2=0 then write(a[i],' ');
readln;
end.
Program HOC24;
var n,d,i: integer;
B: array[1..100] of integer;
t: longint;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('B[',i,']='); readln(b[i]);
end;
d:=0; t:=0;
for i:=1 to n do
if b[i]>0 then
begin
d:=d+1;
t:=t+b[i];
end;
writeln('Tong cac so duong trong day so la: ',t);
write('Co ',d,' so duong trong day');
readln
end.
uses crt;
var b:array[1..100] of longint;
n,i,d,s:longint;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']: '); readln(b[i]);
if b[i]>0 then begin
inc(d);
inc(s,b[i]);
end;
end;
writeln('Tong cac so duong: ',s);
writeln('Co ',d,' so duong');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
cin>>a>>b;
cout<<a+b<<endl;
cout<<a-b;
return 0;
}