Những câu hỏi liên quan
Minh Anh Doan
Xem chi tiết
Nguyễn Lê Phước Thịnh
21 tháng 10 2021 lúc 23:33

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<fixed<<setprecision(2)<<1/(a*1.0+b*1.0);

return 0;

}

Bình luận (0)
User
Xem chi tiết
Nguyễn Lê Phước Thịnh
8 tháng 11 2021 lúc 23:27

Đề thiếu rồi bạn

Bình luận (0)
hoàng kim
Xem chi tiết
Nguyễn Lê Phước Thịnh
5 tháng 5 2021 lúc 23:25

Bài 1: 

uses crt;

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

i,n,min:integer;

begin

clrscr;

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

for i:=1 to n do 

begin

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

end;

min:=a[1];

for i:=1 to n do 

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

writeln(min);

readln;

end.

Bình luận (1)
Nguyễn Lê Phước Thịnh
5 tháng 5 2021 lúc 23:26

Bài 2: 

uses crt;

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

i,n,max:integer;

begin

clrscr;

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

for i:=1 to n do 

begin

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

end;

max:=a[1];

for i:=1 to n do 

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

writeln(max);

readln;

end.

Bình luận (0)
nuinuini
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 10 2021 lúc 0:11

Câu 3: 

#include <bits/stdc++.h>

using namepsace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

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

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

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

return 0;

}

Bình luận (0)
nuinuini
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 10 2021 lúc 0:10

Câu 3: 

#include <bits/stdc++.h>

using namepsace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

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

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

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

return 0;

}

Bình luận (0)
nuinuini
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 10 2021 lúc 0:11

Câu 3:

#include <bits/stdc++.h>

using namepsace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

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

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

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

return 0;

}

Bình luận (0)
phuongtra pham
Xem chi tiết
Nguyễn Lê Phước Thịnh
13 tháng 11 2021 lúc 0:07

uses crt;

var a,b:integer;

begin

clrscr;

readln(a,b);

writeln(a div b);

writeln(a mod b);

readln;

end.

Bình luận (0)
Nguyễn Huỳnh Mai Trân
Xem chi tiết
Nguyễn Lê Phước Thịnh
14 tháng 4 2022 lúc 22:05

#include <bits/stdc++.h>

using namespace std;

long long n,i,x,a[1000],t;

int main()

{

cin>>n;

for (i=1; i<=n; i++) cin>>a[i];

cin>>x;

t=0;

for (i=1; i<=n; i++)

if (a[i]!=x) 

{

cout<<a[i]<<" ";

t+=a[i];

}

cout<<endl;

cout<<t;

return 0;

}

Bình luận (0)
nông thị ngân
Xem chi tiết
Nguyễn Lê Phước Thịnh
22 tháng 3 2021 lúc 19:41

uses crt;

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

n,i,k,t,t1:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

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

end;

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

t:=0;

for i:=1 to n do 

  if a[i] mod 2<>0 then t:=t+a[i];

t1:=0;

for i:=1 to n do 

  if a[i] mod k=0 then t1:=t1+a[i];

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

writeln('Tong cac phan tu la boi cua ',k,' la: ',t1);

readln;

end.

Bình luận (1)