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.
#include <bits/stdc++.h>
using namespace std;
long long m,n;
int main()
{
cin>>m>>n;
cout<<m*n;
return 0;
}
Program HOC24;
var n: longint;
i,d,tg,j,m: integer;
a: array[1..10] of integer;
begin
write('Nhap n='); readln(n);
m:=0; d:=0;
while n<>0 do
begin
d:=d+1;
a[d]:=n mod 10;
n:=n div 10;
end;
if m>0 then
begin
for i:=1 to d do
for j:=i to d do
if a[i]>a[j] then
begin
tg:=a[i];
a[i]:=a[j];
a[j]:=tg;
end;
end else
begin
for i:=1 to d do
for j:=i to d do
if a[i]<a[j] then
begin
tg:=a[i];
a[i]:=a[j];
a[j]:=tg;
end;
end;
if m>0 then
for i:=1 to d do write(a[i]) else
begin
write('-');
for i:=1 to n do write(abs(a[i]));
end;
readln
end.
1:
uses crt;
var t,x,i,n:integer;
begin
clrscr;
t:=0;
n:=10;
for i:=1 to n do
begin
readln(x);
t:=t+x;
end;
write(t);
readln;
end.
2:
uses crt;
var dem,x,i,n:integer;
begin
clrscr;
dem:=0;
n:=10;
for i:=1 to n do
begin
readln(x);
if x mod 2=0 then inc(dem);
end;
write(dem);
readln;
end.
3
program Cacsole;
uses crt;
var M, N, i: integer;
begin
clrscr;
write ('Nhap M= '); readln(M);
write ('Nhap N= '); readln(N);
for i := M to N do
if i mod 2 = 1 then
write (i,' ');
readln;
end.
câu 1)ar i,max,maxnhi,n:integer;
a:array[1..100] of integer;
begin
repeat
write('n=');readln(n);
until (n>1) and (n<40)
for i:=1 to n do begin
write('So thu ',i,': ');readln(a[i]);
end;
max:=a[1];
for i:=2 to n do
if a[i] > max then max:=a[i];
maxnhi:=a[1];
for i:=1 to n do
if (a[i]>maxnhi) and (a[i]<max) then maxnhi:=a[i];
write(' So lon thu 2 la: ',maxnhi);
readln;
end.
uses crt;
var n,i:longint;
t:real;
begin
clrscr;
write('n='); readln(n);
if (1<=n) and (n<=10000) then
begin
t:=0;
for i:=1 to n do
t:=t+(1/(sqr(i)));
writeln('T=',t:4:2);
end
else writeln('vui long nhap lai n');
readln;
end.
uses crt;
var n,i,d,x,j,tam:longint;
a:array[1..11]of integer;
st:string;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n>0;
str(n,st);
d:=length(st);
for i:=1 to d do
begin
val(st[i],a[i],x);
end;
for i:=1 to d-1 do
for j:=i+1 to d do
if a[i]<a[j] then
begin
tam:=a[i];
a[i]:=a[j];
a[j]:=tam;
end;
for i:=1 to d do
write(a[i]);
readln;
end.
Câu 1:
Program HOC24;
var i,p: integer;
t: longint;
begin
write('Nhap P: '); readln(p);
t:=0;
for i:=1 to p do if i mod 2<>0 then t:=t+i;
write('Tong cac so le la: ',t);
readln
end.