Những câu hỏi liên quan
T Đạt
Xem chi tiết
HT.Phong (9A5)
29 tháng 3 2023 lúc 16:26

uses crt;
var n, i : integer;
begin clrscr;
readln(n);
for i:=1 to 9 do writeln(n,' x ', i, ' = ', n*i);
readln;
end.

Bình luận (0)
Nguyễn Hoàng Duy
29 tháng 3 2023 lúc 23:42

program MultiplicationTable;

uses crt;

var
  N, i, j: integer;

begin
  clrscr;
  write('Enter N: ');
  readln(N);

  for i := 1 to 9 do
  begin
    writeln(N, ' x ', i, ' = ', N*i);
  end;

  readln;
end.

Bình luận (0)
28 Nhật Quý
Xem chi tiết
Vũ Quang Huy
11 tháng 3 2022 lúc 10:01

uses crt;

var i,n:integer;

begin

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

writeln('bang nhan',n);

for i:=1 to 10 do writeln(n,' x ',i:2,' = ',n*i:3);

readln

end.

Bình luận (0)
Phạm Thị Đông Nhi_HDI
Xem chi tiết
shitbo
21 tháng 6 2020 lúc 16:54

program hello;

uses crt;

Var n,i,j,k: integer;

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

begin;

a[1]:=k;

Readln(n);

For i:=1 to n do

Begin;

Writeln('nhap a[',i,'] '); Readln(a[i]);

End;

For i:=1 to n-1 do

For j:=i+1 to n do

If a[i]<a[j] then k:=a[j];

Writeln('gia tri lon nhat la', k);

end.

Bình luận (0)
 Khách vãng lai đã xóa
Bùi Trần Nghĩa Hưng
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 10 2021 lúc 0:17

Câu 1: 

#include <bits/stdc++.h>

using namespace std;

double a,b,c;

int main()

{

cin>>a>>b>>c;

cout<<fixed<<setprecision(2)<<(a+b+c)/3;

return 0;

}

Bình luận (0)
Đỗ Thành Nhân
3 tháng 5 lúc 11:14

nbbnbnbbnn\(\dfrac{^{ }}{ }\)

Bình luận (0)
XTN - GAMING
Xem chi tiết
Nguyễn Lê Phước Thịnh
21 tháng 3 2022 lúc 10:19

1:

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<a+b;

return 0;

}

2:

#include <bits/stdc++.h>

using namespace std;

double s,r;

int main()

{

cin>>r;

s=r*r*pi;

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

return 0;

}

Bình luận (0)
Nguyễn Thanh Anh
Xem chi tiết
Phan Thị Phương Thy
Xem chi tiết
Nguyễn Lê Phước Thịnh
28 tháng 4 2021 lúc 19:03

uses crt;

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

i,n,max,min: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];

min:=a[1];

for i:=1 to n do 

  begin

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

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

end;

writeln('So lon nhat la: ',max);

writeln('So nho nhat la: ',min);

readln;

end.

Bình luận (0)
Minh Lệ
28 tháng 4 2021 lúc 20:26

Program HOC24;

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

i,max,min,n: integer;

begin

write('Nhap so phan tu N: '); readln(N);

for i:=1 to n do

begin

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

end;

max:=a[1]; min:=a[1];

for i:=1 to n do

begin

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

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

end;

writeln('So nho nhat la :',max);

write('So lon nhat la: ',min);

readln

end.

Bình luận (0)
Huyền Trang
Xem chi tiết
Nguyễn Lê Phước Thịnh
6 tháng 1 2023 lúc 14:30

uses crt;

var x,y:integer;

begin

clrscr;

readln(x,y);

if x>y then write(x)

else write(y);

readln;

end.

Bình luận (0)
PC Vũ
Xem chi tiết
Buddy
10 tháng 5 2021 lúc 20:21

uses crt;

var n, i, j, dem: longint; {Bạn có thể thay longint thành integer nha}

A:array[1..1000] of longint;

begin

clrscr;

Write('Nhap N: '); readln(n);

for i:=1 to n do

begin

write('Nhap phan tu thu ',i,': ');

readln(A[i]);

end;

Write('Cac so nguyen to co trong mang la: ');

for i:=1 to n do

begin

dem:=0;

for j:=2 to A[i]/2 do

if A[i] mod j=0 then dem:=dem+1;

if dem=0 then write(A[i],' ');

end;

end.

Bình luận (0)
Nguyễn Lê Phước Thịnh
11 tháng 5 2021 lúc 11:06

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.

Bình luận (0)
Lê Thị Thu Phương
7 tháng 6 2021 lúc 21:23

uses crt;
var a:array[1..1000000] of longint;
      n,i,s:longint;
begin
      clrscr;
      write('n='); readln(n);
      for i:=1 to n do 
            begin
                  write('a[',i,']: '); readln(a[i]);
                  inc(s,a[i]);
            end;
      writeln('Tong: ',s);
      readln;
end.

Bình luận (0)