Những câu hỏi liên quan
trần nguyễn tuyết trinh
Xem chi tiết
lamgi hoi
Xem chi tiết
Anh Phạm
25 tháng 7 2021 lúc 14:23

cau 1:

uses crt;

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

n,i,min: integer;

begin

readln(n);

for i:=1 to n do

readln(a[i]);

min:=a[1];

for i:=2 to n do

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

writeln(a[i]);

readln;

end.

cau 2:

uses crt;

g:text;

s:string;

const fo='CHUSO.TXT'

begin

assign(g,fo);

rewrite(g);

readln(s);

for i:=1 to length(s) do

if not((s[i] in ['a'..'z'])and(s[i] in ['A'..'Z])) then delete(s,i,1);

writeln(g,s);

end.

Bình luận (0)
Benny
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 3 2023 lúc 14:55

6:

#include <bits/stdc++.h>

using namespace std;

int main()

{

int n,A[100],i,dem=0;

cin>>n;

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

for (int i=1;i<=n; i++)

if (A[i]%2!=0) dem++;

cout<<dem;

return 0;

}

5:

#include <bits/stdc++.h>

using namespace std;

int main()

{

long long n,nn=1e6,A[1000];

cin>>n;

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

for (int i=1; i<=n; i++)

nn=min(nn,A[i]);

for (int i=1; i<=n; i++)

if (nn==A[i]) cout<<i<<" ";

return 0;

}

Bình luận (0)
Assi Lanh
Xem chi tiết
Nguyễn Lê Phước Thịnh
13 tháng 4 2022 lúc 18:29

uses crt;

const fo='data.txt'

var f1:text;

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

i,n:integer;

begin

clrscr;

assign(f1,fo); rewrite(f1);

n:=10;

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

for i:=1 to n do write(f1,a[i]:4);

close(f1);

readln;

end.

Bình luận (0)
Meii
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 1 2022 lúc 22:18

#include <bits/stdc++.h>

using namespace std;

long long a[1000],i,n,t,dem;

int main()

{

cin>>n;

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

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

cout<<endl;

dem=0;

t=0;

for (i=1; i<=n; i++)

if (a[i]>0)

{

dem++;

t=t+sqrt(a[i]);

}

cout<<t;

return 0;

}

Bình luận (0)
U Lan
Xem chi tiết
U Lan
Xem chi tiết
U Lan
Xem chi tiết
U Lan
Xem chi tiết