Những câu hỏi liên quan
Dania sunna
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 12 2021 lúc 23:23

#include <bits/stdc++.h>

using namespace std;

long long a,b,c,d;

int main()

{

freopen("input.txt","r",stdin);

freopen("output.txt","w",stdout);

cin>>a>>b>>c>>d;

cout<<a+b+c+d;

return 0;

}

Bình luận (0)
No One Actually
Xem chi tiết
No One Actually
11 tháng 4 2021 lúc 20:11

help

 

Bình luận (0)
Nguyễn Lê Phước Thịnh
12 tháng 4 2021 lúc 13:04

const fi='input.txt'

fo='output.txt'

var f1,f2:text;

a,b,c,max:real;

begin

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

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

readln(f1,a,b,c);

min:=a;

if min>b then min:=b;

if min>c then min:=c;

writeln(f2,min);

close(f1);

close(f2);

end.

Bình luận (0)
Hoài Ân 02 Lê Huỳnh
Xem chi tiết
Mạnh Cường Đào Huỳnh
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 5 2022 lúc 23:55

const fi='input.txt'

fo='output.txt'

var f1,f2:text;

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

i,n,t:integer;

begin

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

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

n:=0;

while not eof(f1) do 

begin

inc(n);

read(f1,a[n]);

end;

t:=0;

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

write(f2,t);

close(f1);

close(f2);

end.

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

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);

writeln(f2,a+b);

close(f1);

close(f2);

end.

Bình luận (0)
Khánh Mỹ
Xem chi tiết
Nguyễn Lê Phước Thịnh
21 tháng 4 2021 lúc 19:21

const fi='input.txt'

fo='output.txt'

var f1,f2:text;

st:string[125];

a:array[1..125]of string;

i,d,dem,kt,j:integer;

begin

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

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

readln(f1,st);

d:=length(st);

dem:=1;

a[1]:=st[1];

for i:=1 to d do

  begin

kt:=0;

for j:=1 to dem do 

  if a[j]=st[i] then kt:=1;

if kt=0 then 

begin

inc(dem);

a[dem]:=st[i];

end;

end;

for i:=1 to dem do 

  begin

dem1:=0;

for j:=1 to d do 

if a[i]=st[j] then inc(dem1);

writeln(f2,a[i],' xuat hien ',dem1,' lan');

end;

close(f1);

close(f2);

end.

Bình luận (0)
Yến Hoang Thị Hải
Xem chi tiết
Đỉnh Trần
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 4 2021 lúc 13:35

const fi='input.txt'

fo='output.txt'

var f1,f2:text;

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

i,n,m,j,max:integer;

begin

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

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

readln(f1,n,m);

for i:=1 to n do 

  begin

     for j:=1 to m do 

read(f1,a[i,j]);

readln(f1);

end;

for i:=1 to n do

  begin

max:=a[i,1];

for j:=1 to n do 

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

writeln(f2,max);

end;

close(f1);

close(f2);

end.

Bình luận (0)
Anh Em Song Sinh
Xem chi tiết
Nguyễn Lê Phước Thịnh
27 tháng 1 2021 lúc 22:34

const fi='input.txt'

fo='output.txt'

var st:string;

f1,f2:text;

i,d:integer;

begin

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

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

readln(f1,st);

d:=length(st);

for i:=1 to d do 

 if st[i]<>#32 then write(f2,st[i]);

close(f1);

close(f2);

end.

Bình luận (0)