Những câu hỏi liên quan
Ngân
Xem chi tiết
Hello1234
Xem chi tiết
Nguyễn Lê Phước Thịnh
26 tháng 10 2021 lúc 23:27

#include <bits/stdc++.h>

using namespace std;

string n;

int main()

{

cin>>st;

int d=st.length();

for (int i=0; i<=d-1; i++)

if (st[i]==0) st[i]='5'

cout<<st;

return 0;

}

Bình luận (0)
Hello1234
Xem chi tiết
Nguyễn Lê Phước Thịnh
26 tháng 10 2021 lúc 23:31

#include <bits/stdc++.h>

using namespace std;

string n;

int main()

{

cin>>st;

int d=st.length();

for (int i=0; i<=d-1; i++)

if (st[i]==0) st[i]='5'

cout<<st;

return 0;

}

Bình luận (0)
thanh thuý
Xem chi tiết
Nguyễn Lê Phước Thịnh
10 tháng 5 2021 lúc 19:56

Câu 1:

uses crt;

var n,i,kt:integer;

begin

clrscr;

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

if n<2 then writeln(n,' khong la so nguyen to')

else begin

kt:=0;

for i:=2 to n-1 do 

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

if kt=0 then writeln(n,' la so nguyen to')

else writeln(n,' khong la so nguyen to');

end;

readln;

end.

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

Câu 2: 

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)
lê thiện thanh ngân
Xem chi tiết
Bacteria
21 tháng 12 2016 lúc 13:53

program bai_5;

uses crt;

var a,b,c :real;

BEGIN

write('nhap vao so a'); Readln(a);

write('nhap vao so b'); Readln(b);

write('nhap vao so c'); Readln(c);

if a<0 then a:=-a;

max:=a;

if max <b then max:=b;

if max<c then max:=c;

write('gia tri tuyet doi cua a la:',a);

write('so lon nhat trong ba so a,b,c la:',max);

Readln

END.

Thanks

Bình luận (1)
Đạt Nguyễn
Xem chi tiết
Trần Ái Linh
25 tháng 5 2021 lúc 9:52

program im_14424;

uses crt;

var A: array[1..100000] of integer;

S,i,n: integer;

begin

clrscr;

write('Nhap vao n: ');

readln(n);

S:=0;

for i:=1 to n do

begin

write('Nhap A[',i,']: ');

readln(A[i]);

if (A[i] mod 2 = 0 then S:=S+i;

end;

write(S);

readln

end.

Bình luận (2)
A8_ Võ Thị Thương
Xem chi tiết
Phía sau một cô gái
5 tháng 5 2023 lúc 21:07

s = input("Nhập một xâu bất kỳ: ")

print("Các ký tự và chữ số trong xâu là:")

for char in s:

       if char.isdigit() or char.isalpha():

              print(char)

Bình luận (1)
Hehe
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 1 2022 lúc 20:42

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<a-b;

return 0;

}

Bình luận (0)
Huyền Nguyễn
Xem chi tiết