Viết chương trình nhập vào một xâu ký tự
Câu vấn đáp được xác xắn chứa thông tin chính xác và đáng tin cậy, được chứng thực hoặc trả lời bởi các chuyên gia, giáo viên số 1 của bọn chúng tôi.
Bạn đang xem: Viết chương trình nhập vào một xâu ký tự

Bài 1:
program b1;uses crt;var dem,i:integer;
s:string;
k:char;begin clrscr; writeln("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s); write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap ki tu k: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(k); dem:=0; for i:=1 lớn length(s) vì chưng if k=s then dem:=dem+1; writeln(‘Trong xau teo ‘,dem,’ ki tu bang ki tu ‘,k);readln;end.
Bài 2:
Program b2;uses crt;var s1,s2:string;begin clrscr; write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau 1: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s1); write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau 2: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s2); if s1<2>=s2
Bài 3:
program b3;uses crt;var s:string; i,dem:integer;begin clrscr; write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s); dem:=0; for i:=1 khổng lồ length(s) vì if (s in <"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpga"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg.."https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgz"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg>) or (s in <"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgA"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg.."https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgZ"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg>) then dem:=dem+1; writeln("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgSo tu teo trong xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg,dem);readln;end.
Học tốt!
Hãy giúp mọi người biết câu trả lời này núm nào?

star
starstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstar
5
starstarstarstarstar
1 vote
GửiHủy
Đăng nhập nhằm hỏi đưa ra tiết
Chưa gồm nhómTrả lời921
500

Bài 1:
program oken;uses crt;var s: string; k: char; dem,i: byte;begin clrscr; write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap 1 xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s); write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap 1 ki tu k: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(k); dem:=0; for i:=1 lớn length(s) bởi if k=s then dem:=dem+1; writeln("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgSo ki tu la "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg,k,"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg teo trong xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg,dem); readln;end.
Xem thêm: Sơ Đồ Tư Duy Ankan Ngắn Gọn, Dễ Hiểu, Sơ Đồ Tư Duy Về Điều Chế Và Ứng Dụng Của Ankan
Bài 2:
program oken;uses crt;var s1,s2: string;begin clrscr; write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau thu 1: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s1); write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau thu 2: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s2); if s1<2>=s2
Bài 3:
program oken;uses crt;var s: string; i,dem: byte;begin clrscr; write("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgNhap xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg); readln(s); dem:=0; for i:=1 khổng lồ length(s) vì chưng if (s in <"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpga"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg.."https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgz"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg>) or (s in <"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgA"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg.."https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgZ"https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg>) then dem:=dem+1; writeln("https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpgSo tu co trong xau: "https://aquabigman.com/viet-chuong-trinh-nhap-vao-mot-xau-ky-tu/imager_4_208_700.jpg,dem); readln;end.
Hãy giúp mọi tín đồ biết câu vấn đáp này ráng nào?
star
starstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstarstar
starstarstarstarstar
GửiHủy
Đăng nhập để hỏi đưa ra tiết
XEM GIẢI BÀI TẬP SGK TIN 11 - TẠI ĐÂY
Bạn mong muốn hỏi điều gì?
Đặt câu hỏi
Sự kiện
Bạn muốn hỏi điều gì?
Đặt câu hỏiLý do báo cáo vi phạm?
Gửi yêu cầu Hủy

Cơ quan chủ quản: công ty Cổ phần technology Giáo dục Thành Phát
Tải ứng dụng



Xem thêm: Top 14+ Ví Dụ Về Môi Trường Ưu Trương Là Gì, Top 12 Nhược Trương Là Gì
Giấy phép cấu hình thiết lập mạng xã hội trên mạng số 331/GP-BTTTT vì Bộ tin tức và Truyền thông.