K
Khách

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.

21 tháng 11 2018

var x,y,z:integer;

begin

Write('nhap x=');

Readln(x);

Write (' nhap y =');

Readln(y);

z:=x;

x:=y;

y:=z;

Write ('gia tri x la: ',x);

Write ('gia tri y la : ',y);

Readln;

end.

#include <bits/stdc++.h>

using namespace std;

long long x,y;

int main()
{

cin>>x>>y;

swap(x,y);

cout<<x<<" "<<y;

return 0;

}

15 tháng 10 2021

#include <bits/stdc++.h>

using namespace std;

long long x,y,tam;

int main()

{

cin>>x>>y;

cout<<"x truoc khi doi la:"<<x<<endl;

cout<<"y truoc khi doi la:"<<y<<endl;

tam=x;

x=y;

y=tam;

cout<<"x sau khi doi la:"<<x<<endl;

cout<<"y sau khi doi la:"<<y;

return 0;

}

29 tháng 12 2016

-so sanh hai so nhap tu ban phim:

var a,b:integer;

begin

clrscr;

write('Nhap so thu nhat:');readln(a);

write('Nhap so thu hai:');readln(b);

if a>b then writeln(a,'lon hon',b)

else writeln(a,'nho hon,'b);

if a=b then writeln(a,'bang',b);

readln;

end.

12 tháng 4 2017

program ctdt;
uses crt;
type mang=array[1..10]of integer;
var a,b,min,x,y,i,j,tam:integer;
t,t1:mang;
(*------------------------*)
BEGIN
clrscr;
(*cau a*)
write('nhap 2 so:');readln(a,b);
if a>b then writeln(a,' lon hon ',b);
if a=b then writeln(a,' bang ',b);
if a<b then writeln(a,' nho thua ,b);
(*cau b*)
for i:=1 to 4 do {dua 4 so vao 1 mang}
begin
write(so thu ',i,' :');readln(t[i]);
end;
min:=t[1];
for i:=2 to 4 do
if t[i]<min then min:=t[i];
writeln('so nho nhat trong bon so:',min);
(*cau c*)
write('nhap hai so x,y:');readln(x,y);
if x>y then
begin
tam:=x;
x:=y;
y:=tam;
end;
(*cau d*)
for i:=1 to 3 do {dua 3 so vao mot mang}
begin
write(' so thu ',i,': ');readln(t1[i]);
end;

for i:=1 to 3-1 do
for j:=i+1 to 3 do
if t1[j]>t1[i] then
begin
tam:=t1[j];
t1[j]:=t1[i];
t1[i]:=tam;
end;
for i:=1 to 3 do
write(t1[i]);

readln;
end.

bai nay con vai loi sai nho

ban nen chay tung cau mot va khoa cac cau con lai bang lenh {...}

QT
Quoc Tran Anh Le
Giáo viên
18 tháng 11 2023

11 tháng 11 2021

Câu 2: 

uses crt;

var x,y:int64;

begin

clrscr;

readln(x,y);

writeln(x+y);

readln;

end.

21 tháng 11 2018

var x,y,z:real;

begin

Write('nhap x=');

Readln(x);

Write (' nhap y =');

Readln(y);

z:=x;

x:=y;

y:=z;

Write ('gia tri x la: ',x);

Write ('gia tri y la : ',y);

Readln;

end.

21 tháng 11 2018

kiểu dữ liệu là integer

11 tháng 10 2021

uses crt;

var x,y:integer;

begin

readln(x,y);

writeln(x,' ',y);

wrieln(y,' ',x);

readln;

end.

 


 

11 tháng 10 2021

cái đề của bạn nó rất là khặp khiển đấy