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.

12 tháng 4 2018

prograam bi1;

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

i:,sngint;tbc:real;ten:string

begin

write('Nhap ten ');readln(ten);

s:=0;

for i:=1 to n do

begin

write('Nhap diem thu ',i,'= ');

readln(a[i]);

s:=s+a[i];

end;

write('Nhung con diem <5 la ');

for i:=1 to n do

if a[i]<5 then write(a[i],' ');

wrtieln ;

write('NHung con diem 10 la ');

for i:=1 to n do

if a[i]<10then write(a[i],' ');

tbc:=s/n;

if tbc>=8 then write('Ban duoc hsg')

else if tbc>=6.5 then write('Ban dat danh hieu hoc sinh tien tien')

else if tbc>=5 then wrtie('Ban dat danh hieu trung binh ')

else write('Ban dat danh hieu yeu');

readln

end.

28 tháng 4 2022

uses crt;

var n,i:integer;

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

begin

clrscr;

write(‘nhap so phan tu cua day:’);readln(n);

for i:=1 to n do

begin

write(‘a[‘,i,’]=’);readln(a[i]);

end;

writeln(‘day so da nhap:’);

for i:=1 to n do write(a[i]:2);

readln;

end.

18 tháng 10 2021

Câu 3: 

#include <bits/stdc++.h>

using namepsace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

p=(a+b+c)/2;

s=sqrt(p*(p-a)*(p-b)*(p-c));

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

return 0;

}

18 tháng 10 2021

Câu 3: 

#include <bits/stdc++.h>

using namepsace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

p=(a+b+c)/2;

s=sqrt(p*(p-a)*(p-b)*(p-c));

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

return 0;

}

24 tháng 12 2021

#include <bits/stdc++.h>

using namespace std;

long long n,i,a[1000];

int main()

{

cin>>n;

for (i=1; i<=n; i++) cin>>a[i];

sort(a+1,a+n+1);

for (i=n; i>=1; i--) cout<<a[i]<<" ";

return 0;

}

18 tháng 10 2021

Câu 3:

#include <bits/stdc++.h>

using namepsace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

p=(a+b+c)/2;

s=sqrt(p*(p-a)*(p-b)*(p-c));

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

return 0;

}

uses crt;

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

i,n,t,ln,nn:integer;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i]);

t:=0;

for i:=1 to n do

  if a[i]>0 then t:=t+a[i];

ln:=a[1];

nn:=a[1];

for i:=1 to n do 

begin

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

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

end;

writeln(t);

writeln(ln);

writeln(nn);

readln;

end.

28 tháng 5 2022

cảm ơn bác nhiều nhe

 

uses crt;

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

i,n,t:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

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

end;

t:=0;

for i:=1 to n do 

  t:=t+a[i];

writeln(t);

readln;

end.

24 tháng 4 2021

thanks nhiều nhaaa