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.
uses crt;
const fi='songuyen.inp';
fo='songuyen2.out';
var a:array[1..100]of integer;
i,n,t1:integer;
f1,f2:text;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,n);
for i:=1 to n do readln(f1,a[i]);
t1:=0;
for i:=1 to n do if a[i] mod 2<>0 then t1:=t1+a[i];
writeln(t1);
writeln(f2,t1);
for i:=1 to n do
if a[i] mod 2<>0 then write(a[i]:4);
close(f1);
close(f2);
readln;
end.
with open('songuyen.txt', 'r') as f:
with open('ketqua.txt', 'w') as g:
for line in f:
numbers = line.split()
for number in numbers:
if int(number) % 2 == 0:
g.write(number + '\n')
uses crt;
const fi='songuyen.dat';
var f1:text;
a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
readln(f1,n);
for i:=1 to n do
read(f1,a[i]);
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln(t);
close(f1);
readln;
end.
Uses crt;
Var i,n,tong:integer;
a:array[1..10000] of integer;
f1,f2:text;
Begin
clrscr;
Assign(f1,'tinhtong.inp');
Assign(f2,'tinhtong.out');
tong:=0;
Reset(f1);readln(f1,n);
For i:= 1 to n do
Begin
read(f1,a[i]);
tong:=tong+a[i];
End;
close(f1);
rewrite(f2);
Writeln(f2,tong);
Readln;
End.
uses crt;
const fi='data.txt';
var f1:text;
a:array[1..100]of integer;
n,i:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eof(f1) do
begin
n:=n+1;
read(f1,a[n]);
end;
for i:=1 to n do
if a[i] mod 2=0 then write(a[i]:4);
close(f1);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
freopen("sn.inp","r",stdin);
freopen("cn.out","w",stdout);
cin>>a>>b;
cout<<a*b;
return 0;
}
uses crt;
const fi='mang.inp';
var f1:text;
a:array[1..10000]of integer;
i,n:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eof(f1) do
begin
n:=n+1;
read(f1,a[i]);
end;
for i:=1 to n do write(a[i]:4);
close(f1);
readln;
end.
uses crt;
const fi='songuyen.txt';
var f1:text;
a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eof(f1) do
begin
inc(n);
read(f1,a[n]);
end;
t:=0;
for i:=1 to n do
if a[i]>0 then t:=t+a[i];
writeln(t);
close(f1);
readln;
end.