Bạn chưa đăng nhập. Vui lòng đăng nhập để hỏi bài

Những câu hỏi liên quan
Hoài Ân 02 Lê Huỳnh
Xem chi tiết
Assi Lanh
Xem chi tiết
Nguyễn Lê Phước Thịnh
13 tháng 4 2022 lúc 18:29

uses crt;

const fo='data.txt'

var f1:text;

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

i,n:integer;

begin

clrscr;

assign(f1,fo); rewrite(f1);

n:=10;

for i:=1 to n do readln(a[i]);

for i:=1 to n do write(f1,a[i]:4);

close(f1);

readln;

end.

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.

vutransosn
Xem chi tiết
33. PHAN THỊ HỒNG THẮM 1...
Xem chi tiết
Trần Văn Tiến
Xem chi tiết
Nguyễn Lê Phước Thịnh
10 tháng 2 2022 lúc 8:41

uses crt;

const fi='input.txt'

fo='output.txt'

var f1,f2:text;

a,b:integer;

begin

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

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

readln(f1,a,b);

if (a=0) and (b=0) then writeln(f2,'Phuong trinh co vo so nghiem');

if (a<>0) then writeln(f2,-b/a:4:2);

if (a=0) and (b<>0) then writeln(f2,'Phuong trinh vo nghiem');

close(f1);

close(f2);

end.

Khue Nguyen
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 5 2022 lúc 19:38

uses crt;

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

i,n,t:integer;

tb:real;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i]);

t:=0;

for i:=1 to n do t:=t+a[i];

writeln(t/n:4:2);

tb:=t/n;

for i:=1 to n do 

  if a[i]<tb then write(a[i]:4);

readln;

end.

Tiểu cường
Xem chi tiết
Nguyễn Lê Phước Thịnh
11 tháng 3 2022 lúc 9:18

#include <bits/stdc++.h>

using namespace std;

long long d[60],i,n;

int main()

{

cin>>n;

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

for (i=1; i<=n; i++) cout<<d[i]<<" ";

return 0;

}

Trâm Đỗ
Xem chi tiết
Nguyễn Lê Phước Thịnh
7 tháng 12 2021 lúc 23:07

1:

#include <bits/stdc++.h>

using namespace std;

long long t1,t2,i,n,x;

int main()

{

cin>>n;

t1=0;

t2=0;

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

{

cin>>x;

if (x>0) t1=t1+x;

else t2=t2+x;

}

cout<<t1<<" "<<t2;

return 0;

}