Viết chương trinh nhập 6 số nguyên a, b, c, d, e, f Xuất ra màn hình số lớn hơn.

<...">
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.

Sửa đề: In ra màn hình số lớn nhất

uses crt;

var a,b,c,d,e,f,ln:integer;

begin

clrscr;

readln(a,b,c,d,e,f);

ln:=a;

if ln<b then ln:=b;

if ln<c then ln:=c;

if ln<d then ln:=d;

if ln<e then ln:=e;

if ln<f then ln:=f;

write(ln);

readln;

end.

uses crt;

var a,b,c,ln,nn:integer;

tbc:real;

begin

clrscr;

readln(a,b,c);

ln:=a; 

if ln<b then ln:=b;

if ln<c then ln:=c;

nn:=a;

if nn>b then nn:=b;

if nn>c then nn:=c;

writeln(ln);

writeln(nn);

tbc:=(a+b+c)/3;

if a>tbc then write(a,' ');

if b>tbc then write(b,' ');

if c>tbc then write(c,' ');

writeln;

if a=tbc  then write(a,' ');

if b=tbc then write(b,' ');

if c=tbc then write(c,' ');

readln;

end.

23 tháng 3 2023

Program HOC24;

var a,b: integer;

begin

write('Nhap a: '); readln(a);

write('Nhap b: '); readln(b);

if a>b then write(a,' lon hon ',b);

if a<b then write(b,' lon hon ',a);

if a=b then write('Hai so bang nhau');

readln

end.

a) 

uses crt;

var a:array[1..100]of integer;

i,n,max:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

write('A[',i,']='); readln(a[i]);

end;

max:=a[1];

for i:=1 to n do 

 if max<a[i] then max:=a[i];

writeln(max);

readln;

end.

b) 

uses crt;

var a:array[1..100]of integer;

i,n,min:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

write('A[',i,']='); readln(a[i]);

end;

min:=a[1];

for i:=1 to n do 

 if min>a[i] then min:=a[i];

writeln(min);

readln;

end.

2 tháng 12 2021

Tham khảo:

17 tháng 10 2021

#inlcude <bits/stdc++.h>

using namespace std;

long long a,b;

double thuong;

int main()

{

cin>>a>>b;

thuong=(a*1.0)/(b*1.0);

cout<<fixed<<setprecision(2)<<thuong;

return 0;

}

Bài này là nói gì ạ

 

26 tháng 10 2021

#include <bits/stdc++.h>

using namespace std;

long long a,b,c;

int main()

{

cin>>a>>b>>c;

cout<<a+b+c<<endl;

cout<<a*b*c;

return 0;

}

26 tháng 10 2021

#include <bits/stdc++.h>

using namespace std;

long long a,b,c;

int main()

{

cin>>a>>b>>c;

cout<<a+b+c<<endl;

cout<<a*b*c;

return 0;

}

uses crt;

var b:integer;

begin

clrscr;

readln(b);

writeln(b);

if b mod 2=0 then writeln('la so chan')

else writeln('la so le');

readln;

end.

uses crt;

var a:array[1..100]of integer;

i,n,dem,kt,j:integer;

begin

clrscr;

readln(n);

for i:=1 to n do write(i:4);

writeln;

for i:=2 to n do

begin

kt:=0;

for j:=2 to i-1 do 

if i mod j=0 then kt:=1;

if kt=0 then write(i:4);

end;

readln;

end.