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.

24 tháng 11 2021

Tham khảo!

Program …..; (tên)
uses crt;
Var a, b, p, s integer;
Begin;
Write (‘Nhap chieu dai CD’); Readln (a);
Write (‘Nhap chieu rong CR’); Readln (b);
p:= (a+b)*2
S:= a*b
Writeln (‘Chu vi hinh chu nhat:’ ,p);
Writeln (‘Dien tich hinh chu nhat:’ ,S);
Readln;
End.

24 tháng 11 2021
24 tháng 11 2021
24 tháng 11 2021

Tham khảo!

 Input : chiều dài là a, chiều rộng là b
 a.   Output : tính diện tích hình chữ nhật
b) Thuật toán: 
- B1: Nhập a; b
- B2 : S := 0; 
- B3: Tính diện tích hình chữ nhật : 
     S := a*b; 
- B4: Thông báo và in kết quả.

31 tháng 12 2021

#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<<fixed<<setprecision(2)<<cv<<endl;

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

return 0;

}

6 tháng 10 2021

\(\dfrac{1}{2}S=\dfrac{1}{2}a.b\)

#include <bits/stdc++.h>

using namespace std;

int main()

{

float a,p,s;

cin>>a;

cin>>p;

s=a*p/2;

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

return 0;

}

uses crt;

const fi='x.inp';

var f1:text;

a,b:array[1..100]of integer;

i,n:integer;

begin

assign(f1,fi); reset(f1);

n:=0;

while not eof(f1) do 

begin

n:=n+1;

readln(f1,a[n],b[n]);

end;

for i:=1 to n do 

  begin

writeln('Chu vi dong ',i,' la: ',(a[i]+b[i])*2);

writeln('Dien tich dong ',i,' la: ',a[i]*b[i]);

end;

close(f1);

readln;

end.

var s,dc:longint;

14 tháng 3 2021

15 tháng 3 2021

Đưa kết quả ra màn hình mà bạn.

uses crt;

const fi='hcn.dat';

fo='chuvi.out';

var f1,f2:text;

a,b:array[1..100]of integer;

n,i,j:integer;

begin

clrscr;

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

n:=0;

while not eof(f1) do

begin

n:=n+1;

readln(f1,a[n],b[n]);

end;

for i:=1 to n do

writeln(a[i]*b[i]);

for i:=1 to n do 

  writeln(f2,2*(a[i]+b[i]));

close(f1);

close(f2);

readln;

end.

#include <bits/stdc++.h>

using namespace std;

int main()

{

int a,b;

freopen("hcn.inp","r",stdin);

freopen("hcn.out","w",stdout);

cin>>a>>b;

cout<<(a+b)*2<<endl;

cout<<a*b;

return 0;

}

8 tháng 1 2022

cứu mình với

 

8 tháng 1 2022

chỉ mình với ạ