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.
Program HOC24;
var i,n: integer;
c: array[1..1000] of integer;
f: text;
begin
assign(f,'MANG3.TXT');
reset(f);
readln(f,n);
for i:=1 to n do read(f,c[i]);
close(f);
for i:=1 to n do if c[i] mod 2=1 then write(c[i],' ');
readln
end.
Program HOC24;
var i.n: integer;
a: array[1..250] of integer;
begin
for i:=1 to n do
begin
write('Nhap diem toan cua ban thu ',i,': '); readln(a[i]);
end;
for i:=1 to n do write(a[i],' ');
readln
end.
6:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,A[100],i,dem=0;
cin>>n;
for (int i=1; i<=n; i++) cin>>A[i];
for (int i=1;i<=n; i++)
if (A[i]%2!=0) dem++;
cout<<dem;
return 0;
}
5:
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,nn=1e6,A[1000];
cin>>n;
for (int i=1; i<=n; i++) cin>>A[i];
for (int i=1; i<=n; i++)
nn=min(nn,A[i]);
for (int i=1; i<=n; i++)
if (nn==A[i]) cout<<i<<" ";
return 0;
}
uses crt;
var a:array[1..200]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
writeln('Mang nguoc la: ');
for i:=n downto 1 do
write(a[i]:4);
writeln;
t:=0;
for i:=1 to n do
if (a[i] mod 2=0) and (i mod 2=1) then t:=t+a[i];
writeln('Tong cac so chan co chi so le la: ',t);
writeln('Cac so chia het cho 2 va 5 la: ');
for i:=1 to n do
if (a[i] mod 2=0) and (a[i] mod 5=0) then write(a[i]:4);
readln;
end.
program ct;
uses crt;
var
s1,s2:string;
begin
clrscr;
write('nhap ho dem: ');
readln(s1);
write('nhap ten: ');
readln(s2);
writeln('ten day du la: ',s1,' ',s2);
readln;
end.
uses crt;
var st1,st2:string;
begin
clrscr;
readln(st1,st2);
if st1>st2 then writeln('Xau st1 lon hon')
else if st2>st1 then writeln('Xau st2 lon hon')
else writeln('Hai xau bang nhau');
readln;
end.
1:
#include <bits/stdc++h>
using namespace std;
string a,b;
int main()
{
getline(cin,a);
getline(cin,b);
cout<<a<<" "<<b;
return 0;
}