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.

2 tháng 11 2021

giúp mik với

 

Bài 1:

#include <bits/stdc++.h>

using namespace std;

double a,b,t,s;

int main()

{

cin>>a>>b;

t=a+b;

s=a*b;

cout<<fixed<<setprecision(2)<<t<<endl;

cout<<fixed<<setprecision(2)<<s;

return 0;

}

18 tháng 12 2021

mọi người giúp em giải bài này vs ạ

18 tháng 12 2021

#include <bits/stdc++.h>
using namespace std;
double a,b,c,s,p;
int main()
{
    //freopen("DTTAMGIAC.inp","r",stdin);
    //freopen("DTTAMGIAC.out","w",stdout);
    cin>>a>>b>>c;
    p=(a+b+c)/2;
    s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(5)<<p*2<<endl;    

cout<<fixed<<setprecision(5)<<s;
    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{^{ }}{ }\)

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;

}

16 tháng 11 2021

Program Chu_nhat; uses crt;

Var a, b, S, CV: real;

Begin    

 Write('Nhap chieu dai:'); readln(a);      

Write('Nhap chieu rong:'); readln(b);  

   S := a*b;      

CV := (a+b)*2;    

 Writeln('Dien tich hinh chu nhat la:',S:3:2);  

   Writeln('Chu vi hinh chu nhat la:',CV:3:2);    

 readln;

end.

 

 

23 tháng 5 2022

Program chunhat;

uses crt;

var a,b,p,s:real;

begin

clrscr;

writeln('Nhap chieu dai va rong cua hinh chu nhat: ');

readln(a,b);

s:=a*b;
p:=(a+b)*2;

write('Chu vi hinh chu nhat la: ', p:1:2);

writeln;

write('Dien tich hinh chu nhat la: ', s:1:2);

readln;

end.
 

Kết quả: 

Câu 1: 

#include <bits/stdc++.h>

using namespace std;

double a,b;

int main()

{

cin>>a>>b;

if (a<b) cout<<a;

else cout<<b;

return 0;

}

24 tháng 12 2020

Câu 1: 

uses crt;

var a,s,p:real;

begin

clrscr;

repeat

write('Nhap do dai canh hinh vuong:'); readln(a);

until a>0;

p:=4*a;

s:=sqr(a);

writeln('Chu vi hinh vuong la: ',p:4:2);

writeln('Dien tich hinh vuong la: ',s);

readln;

end.

Câu 2: 

uses crt;

var a,b,t,s,h:real;

begin

clrscr;

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

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

t:=a+b;

h:=a-b;

s:=a*b;

writeln('Tong la: ',t:4:2);

writeln('Hieu la: ',h:4:2);

writeln('Tich la: ',s:4:2);

readln;

end.

Câu 3: 

uses crt;

var a,b,c: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 writeln('Day la ba canh trong mot tam giac')

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

readln;

end.

11 tháng 12 2016

CÂU 1:

program hinhchunhat;

var a,b,S,C: real;

begin

Write('Nhapdodaicanhthuchata=');readln(a);

Write('Nhapdodaicanhthuhaib=');readln(b);

S:= a*b;

C:=(a+b)*2;

Writeln('Dientichhinhchunhatla:',S);

Writeln('Chuvihinhchunhatla:',C);

readln

end.

CHÚC BẠN HỌC TỐT!

11 tháng 12 2016

CÂU 2:(lưu ý: câu này thì mik viết chương trình với bán kính hình tròn là sớ thực được nhập từ bàn phím còn số dương thì bn tự tìm hiểu nhe. nếu tìm hiểu đc thì bn chỉ cần thay phần khai báo var thôi nhe.)

program hinhtron;

var r:real;

const pi=3.14;

begin

clrscr;

Write('Nhapbankinh:');readln(r);

Writeln('Chuvihinhtronla:',2*pi*r);

Writeln('Dientichhinhtronla:',pi*r*r);

readln

end.

CHÚC BẠN HỌC TỐT (x2)