K
Khách

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.

23 tháng 10 2021

Bài 1: 

#include <bits/stdc++.h>

using namespace std;

double a,b,cv,dt;

int main()

{

cin>>a>>b;

cv=(a+b)/2;

dt=a*b;

cout<<"Chu vi la:"<<fixed<<setprecision(2)<<cv<<endl;

cout<<"Dien tich la:"<<fixed<<setprecision(2)<<dt;

return 0; 

}

uses crt;

var a,b,c,p,s:real;

begin

clrscr;

repeat

write('Nhap a='); readln(a);

write('Nhap b='); readln(b);

write('Nhap c='); readln(c);

until (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a);

p:=(a+b+c)/2;

s:=sqrt(p*(p-a)*(p-b)*(p-c));

writeln(s:4:2);

readln;

end.

19 tháng 10 2021

Câu 2: 

#include <bits/stdc++.h>

using namespace std;

double a,b,cv,dt;

int main()

{

cin>>a>>b;

cv=(a+b)*2;

dt=a*b;

cout<<"Chu vi la:"<<fixed<<setprecision(2)<<cv<<endl;

cout<<"Dien tich la:"<<fixed<<setprecision(2)<<dt;

return 0;

}

30 tháng 10 2021

Câu 1: 

#include <bits/stdc++.h>

using namespace std;

double a,b,c;

int main()

{

cin>>a>>b>>c;

cout<<fixed<<setprecision(2)<<(a+b+c)/3;

return 0;

}

3 tháng 5

nbbnbnbbnn\(\dfrac{^{ }}{ }\)

18 tháng 12 2021

#include <bits/stdc++.h>

using namespace std;

double a;

int main()

{

cin>>a;

cout<<a*4<<endl;

cout<<a*a;

return 0;

}

20 tháng 12 2020

Câu 1:

uses crt;

var a,b,c,p,s:real;

begin

clrscr;

repeat

write('Nhap a='); readln(a);

write('Nhap b='); readln(b);

write('Nhap c='); readln(c);

until (a>0) and (b>0) and (c>0);

if (a+b>c) and (a+c>b) and (b+c>a) then 

   begin

        p:=(a+b+c)/2;

s:=sqrt(p*(p-a)*(p-b)*(p-c));

writeln('Dien tich tam giac la: ',s:4:2);

end

else writeln('Day khong la ba canh trong mot tam giac');

readln;

end.

Câu 2: 

uses crt;

var a:array[1..100]of integer;

i,n,t,max,min:integer;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to n do 

  begin

write('A[',i,']='); readln(a[i]);

end;

t:=0;

for i:=1 to n do 

  t:=t+a[i];

writeln('Tong cac phan tu trong day la: ',t);

max:=a[1];

min:=a[1];

for i:=1 to n do 

  begin

     if max<a[i] then max:=a[i];

if min>a[i] then min:=a[i];

end;

writeln('Gia tri lon nhat la: ',max);

writeln('Gia tri nho nhat la: ',min);

readln;

end. 

20 tháng 12 2020

nếu câu b bài 2 được tách riêng thành 1 câu riêng biệt...thì thay thế bắt đầu từ đâu ạ

 

22 tháng 10 2021

Program Munn;

Uses crt;

Var h,m,n,C:real;

Begin

Write ('Nhap canh 1');

Readln (h);

Write ('Nhap canh 2');

Readln (m);

Write ('Nhap canh 3');

Readln (n);

C:=h+m+n;

Writeln ('Chu vi hinh tam giac do la',C);

Readln;

End.

19 tháng 12 2021

a: Input: a

Output: a2