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.
#include <bits/stdc++.h>
using namespace std;
long long a,b,c;
int main()
{
cin>>a>>b>>c;
cout<<(a+b)*c/2;
return 0;
}
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.
Câu 1:
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
write(a+b);
readln;
end.
Câu 2:
uses crt;
var a,b,c:integer;
begin
clrscr;
readln(a,b,c);
writeln(a+b-c);
readln;
end.
Câu 3:
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
writeln(a-b);
readln;
end.
Câu 4:
uses crt;
var x,y,z:integer;
begin
clrscr;
readln(x,y,z);
writeln((x+y)*z);
readln;
end.
Program Bai1;
Uses crt;
Var a,b,c:integer;
Begin
CLRSCR;
Write('a='); Readln(a);
Write('b='); Readln(b);
Write('c='); Readln(c);
If (a*a=b*b+c*c) then Write('a,b,c la cac canh cua 1 tam giac vuong')
else('a,b,c khong phai la cac canh cua 1 tam giac vuong');
Readln
END.
program kiem_tra;
uses crt;
var a,b,c:integer;
begin
write('nhập số a');readln(a);
write('nhập số b');readln(b);
write('nhập số c');readln(c);
if(a*a=b*b+c*c)or(b*b=c*c+a*a)or(c*c=b*b+a*a)then writeln('đây là tam giác vuông') else writeln('đây là tam giác thường');
readln;
end.
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,c,s,x:integer;
begin
clrscr;
write('hs_lop');
writeln('nhap 3 so=');readln(a,b,c);
begin
s:=a+b+c;
writeln('tong la:',s);
x:=a*b*c;
writeln('tich la:',x);
end;
if a mod 2 =0 then writeln(a,'la so chan')
else write('a,'la so le');
readln;
end.
mình ko chắc pn kt thử xem
program tinh;
uses crt;
var a;b:integer;
C:real;
begin
clrscr;
write('ban hay nhap so nguyen a,a='); read(a);
write('ban hay nhap so nguyen b,b='); read(b);
C=a*b/2;
write('gia tri bieu thuc C la,C=',C);
delay(5000);
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b,c;
int main()
{cin>>a>>b>>c;
cout<<(a+b)*c/2;
return 0;}
Program HOC24;
var a,b,c: integer;
t: real;
begin
write('Nhap a; b; c: '); readln(a,b,c);
t:=(a+b)*c/2;
write('Ket qua la: ',t:6:2);
readln
end.