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.
var a: array[1..100] of integer;
i,n:integer;
begin
writeln('nhap n: '); readln(n);
for i:=1 to n do
begin
readln(a[i]);
end;
for i:=1 to n do
begin
if a[i]=1 then write(1)
else
write('1','/',a[i],' ');
writeln;
end;
readln
end.
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=n downto 1 do
write(a[i]:4);
readln;
end.
uses crt;
var a:array[1..100]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;
for i:=1 to n do
write(a[i]:4);
writeln;
t:=0;
for i:=1 to n do
if a[i] mod 3=0 then t:=t+a[i];
writeln(t);
readln;
end.
uses crt;
var n,i,max : integer;
a : array[1..100] of integer;
begin
clrscr;
write('Nhap so n :'); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,' la : '); readln(a[i]);
end;
max:=a[1];
for i:=2 to n do if max<a[i] then max:=a[i];
write('So *** nhat trong mang la :', max);
min:=a[1];
for i:=2 to n do if min>a[i] then min:=a[i];
write('So nho nhat trong mang la :', min);
readln
end.
#include <bits/stdc++.h>
using namespace std;
long long a[1000],i,n,t;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++) cout<<a[i]<<" ";
cout<<endl;
t=0;
for (i=1; i<=n; i++) t+=a[i];
cout<<t;
return 0;
}
Var a:array[1..1000] of integer;
s:longint;
i,n:integer;
Begin
Write('n = ');readln(n);
For i:=1 to n do
Begin
Write('Nhap so thu ',i);readln(a[i]);
If a[i] > 0 then s:=s+a[i];
End;
Write('Tong la ',s);
Readln
End.
#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin>>s;
reverse(s.begin(),s.end());
cout<<s;
return 0;
}