*

chọn lớp tất cả Mẫu giáo Lớp 1 Lớp 2 Lớp 3 Lớp 4 Lớp 5 Lớp 6 Lớp 7 Lớp 8 Lớp 9 Lớp 10 Lớp 11 Lớp 12 ĐH - CĐ
lựa chọn môn tất cả Toán vật dụng lý Hóa học sinh học Ngữ văn giờ đồng hồ anh lịch sử Địa lý Tin học công nghệ Giáo dục công dân Âm nhạc thẩm mỹ Tiếng anh thí điểm lịch sử hào hùng và Địa lý thể thao Khoa học tự nhiên và xóm hội Đạo đức thủ công Quốc phòng an toàn Tiếng việt Khoa học tự nhiên và thoải mái
tất cả Toán vật lý Hóa học viên học Ngữ văn tiếng anh lịch sử vẻ vang Địa lý Tin học technology Giáo dục công dân Âm nhạc thẩm mỹ Tiếng anh thí điểm lịch sử vẻ vang và Địa lý thể thao Khoa học tự nhiên và buôn bản hội Đạo đức bằng tay Quốc phòng bình an Tiếng việt Khoa học tự nhiên và thoải mái
*

Viết chương trình nhập vào 2 số nguyên a,b nhập trường đoản cú bàn phím. Tính và in ra màn hình: Tổng 2 số đó, Tổng bình phương của 2 số đó


*

*

uses crt;

var a,b:integer;

begin

clrscr;

readln(a,b);

writeln('Tong nhị so la: ',a+b);

writeln('Tong binh phuong hai so la: ',sqr(a)+sqr(b));

readln;

end.

Bạn đang xem: Viết chương trình nhập 2 số nguyên a và b


Dưới đây là một vài thắc mắc có thể liên quan tới thắc mắc mà các bạn gửi lên. Hoàn toàn có thể trong đó gồm câu trả lời mà các bạn cần!


Đúng(0)


Câu 1:

uses crt;

var a:array<1..100>of integer;

i,n:integer;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to lớn n do

begin

write('A<',i,'>='); readln(a);

end;

for i:=1 lớn n do

write(a:4);

readln;

end.


Đúng(0)







#include

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout Đúng(0)


#Tin học tập lớp 8




Đúng(2)


#Tin học lớp 8




Đúng(1)



Đúng(0)



#Tin học tập lớp 8




Đúng(1)







*












*




*





toàn bộ Toán vật lý Hóa học sinh học Ngữ văn giờ anh lịch sử dân tộc Địa lý Tin học technology Giáo dục công dân Âm nhạc mỹ thuật Tiếng anh thí điểm lịch sử vẻ vang và Địa lý thể thao Khoa học tự nhiên và thoải mái và buôn bản hội Đạo đức thủ công bằng tay Quốc phòng an toàn Tiếng việt Khoa học tự nhiên và thoải mái







xây dựng nhập từ bàn phím 2 số nguyên khác nhau a cùng b tính tích, hiệu của 2 số a và b biết (a>b). Đưa cực hiếm ra màn hình.

Viết lịch trình nhập vào 2 số nguyên a với b. In ra screen giá trị khủng nhất.

uses crt;

var a,b:integer;

begin

clrscr;

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpga="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgb="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);

if a=b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgvui long nhap nhì so khac nhau"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)

else if a>b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)

else writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,b);

readln;

end.


uses crt;

var a,b:integer;

begin

clrscr;

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpga="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgb="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);

if a=b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgvui long nhap hai so khac nhau"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)

else if a>b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)

else writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,b);

readln;

end.

Xem thêm: Tổng Hợp Hơn 9 Cách Sử Dụng Lightroom Cc 2019, Hướng Dẫn Sử Dụng Lightroom Cơ Bản Trên Máy Tính


uses crt;var a,b:integer;beginclrscr;write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpga="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgb="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);if a=b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgvui long nhap hai so khac nhau"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)else if a>b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)else writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,b);readln;end.

uses crt;

var a,b:integer;

begin

clrscr;

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpga="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgb="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);

if a=b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgvui long nhap nhì so khac nhau"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)

else if a>b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)

else writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso lon nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,b);

readln;

end.


uses crt;

var a,b:integer;

begin

clrscr;

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpga="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgb="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);

if a=b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgvui ***g nhap nhị so khac nhau"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)

else if a>b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso *** nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)

else writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso *** nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,b);

readln;

end.


uses crt;

var a,b:integer;

begin

clrscr;

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpga="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgb="https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);

if a=b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgvui ***g nhap nhì so khac nhau"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)

else if a>b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso *** nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)

else writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgso *** nhat la: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,b);

readln;

end.


uses crt;

var a, b : int64;

begin

clrscr;

write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgNHAP SO NGUYEN A: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(a);

 write("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgNHAP SO NGUYEN B: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg); readln(b);

if a = b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgHAI SO nay BANG NHAU"https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg)

else if a > b then writeln("https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpgSO *** NHAT LA: "https://cdsptphcm.edu.vn/viet-chuong-trinh-nhap-2-so-nguyen-a-va-b/imager_8_13510_700.jpg,a)



*

*

*

coi bằng app thường xuyên sử dụng web!