Những câu hỏi liên quan
Ngáo Ngơ Alice
Xem chi tiết
Nguyễn Lê Phước Thịnh
21 tháng 3 2021 lúc 20:50

Bài 1: 

uses crt;

var n,i:integer;

s:real;

begin

clrscr;

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

s:=0;

for i:=1 to n do 

  s:=s+1/(2*i+1);

writeln(s:4:2);

readln;

end.

Yết Thiên
Xem chi tiết
Trúc Giang
12 tháng 5 2021 lúc 9:55

Câu 2:

Program nii;

Uses crt;

Var a,b,c,A:integer;

Begin

Write ('nhap a');

Readln (a);

Write ('nhap b');

Readln (b);

Write ('nhap c');

Readln (c);

A:=a;

If A<b then A:=b;

If A<c then A:=c;

Write ('Ket qua',A);

Readln;

End.

Trúc Giang
12 tháng 5 2021 lúc 9:51

Câu 1

Program ntg;

Uses crt;

Var A,x,y:integer;

Begin

Write ('nhap x');

Readln (x);

Write ('nhap y');

Readln ('y');

A:=x+y;

Write ('Ket qua',A);

Readln;

End.

 

Nguyễn Lê Phước Thịnh
12 tháng 5 2021 lúc 18:43

Câu 2: 

uses crt;

var a,b,c,max:integer;

begin

clrscr;

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

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

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

max:=a;

if max<b then max:=b;

if max<c then max:=c;

writeln('So lon nhat trong 3 so la: ',max);

readln;

end.

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;

}

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.

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.

nguyễn bảo nga
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 1 2022 lúc 22:25

#include <bits/stdc++.h>

using namespace std;

long long i,n;

double s;

int main()

{

cin>>n;

s=0;

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

 s=s+((1*1.0)/(2*(i*1.0+1*1.0)));

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

return 0;

}

KenShi
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 12 2021 lúc 0:39

Bài 2: 

#include <bits/stdc++.h>

using namespace std;

long long x,y;

int main()

{

cin >>x>>y;

cout<<x<<" "<<y;

swap(x,y);

cout<<x<<" "<<y;

return 0;

}

Ngoc Huyen
Xem chi tiết
Minh Lệ
15 tháng 3 2021 lúc 19:00

Program HOC24;

var m,i,d: integer;

a: array[1..32000] of integer;

begin

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

for i:=1 to m do

begin

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

end;

write('Nhap X = '); readln(x);

d:=0;

for i:=1 to n do if a[i]=x then d:=d+1;

write(X,' xuat hien ',d,' lan trong mang');

readln

end.

Bùi Trần Nghĩa Hưng
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 10 2021 lúc 0:17

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;

}

Đỗ Thành Nhân
3 tháng 5 lúc 11:14

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

lamgi hoi
Xem chi tiết
Anh Phạm
25 tháng 7 2021 lúc 14:23

cau 1:

uses crt;

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

n,i,min: integer;

begin

readln(n);

for i:=1 to n do

readln(a[i]);

min:=a[1];

for i:=2 to n do

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

writeln(a[i]);

readln;

end.

cau 2:

uses crt;

g:text;

s:string;

const fo='CHUSO.TXT'

begin

assign(g,fo);

rewrite(g);

readln(s);

for i:=1 to length(s) do

if not((s[i] in ['a'..'z'])and(s[i] in ['A'..'Z])) then delete(s,i,1);

writeln(g,s);

end.