viết chương trình xuất ra màn hình số lớn nhất trong ba số nguyên ngẫu nhiên được nhập từ bàn phím 12/08/2021 Bởi Valentina viết chương trình xuất ra màn hình số lớn nhất trong ba số nguyên ngẫu nhiên được nhập từ bàn phím
Here is a piece of Python code: # list of numbers your_list = [100, 200, 300, 50, 40, 30] # sorting the list your_list.sort() # printing the last element (greatest element) print(“Greatest element is:”, your_list[-1]) Good luck! 🙂 Bình luận
Đáp án: _ngocnhi05 Giải thích các bước giải: Program ngn; Uses crt; Var a,b,c,min: integer; Begin Writeln (‘nhap a,b,c=’); Readln (a,b,c); If a <b then min:=a else min:=b; If c <min then min:=c; Writeln (‘so lon nhat la:’, max); Readln End. Bình luận
Here is a piece of Python code:
# list of numbers
your_list = [100, 200, 300, 50, 40, 30]
# sorting the list
your_list.sort()
# printing the last element (greatest element)
print(“Greatest element is:”, your_list[-1])
Good luck!
🙂
Đáp án:
_ngocnhi05
Giải thích các bước giải:
Program ngn;
Uses crt;
Var a,b,c,min: integer;
Begin
Writeln (‘nhap a,b,c=’);
Readln (a,b,c);
If a <b then min:=a else min:=b;
If c <min then min:=c;
Writeln (‘so lon nhat la:’, max);
Readln
End.