about summary refs log tree commit diff
path: root/2ndary/THT/B/QG-2014/sample.pas
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2020-06-06 21:33:13 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2020-06-06 21:33:13 +0700
commit2f674dc80f0382f1c3178f435714960734dc9d3c (patch)
tree2abba7e4ec72bd16f58f7375126144d3fd9f4bca /2ndary/THT/B/QG-2014/sample.pas
parentb2d80610db6beda38573890ed169815e495bc663 (diff)
downloadcp-2f674dc80f0382f1c3178f435714960734dc9d3c.tar.gz
Reorganize stuff from secondary school
Diffstat (limited to '2ndary/THT/B/QG-2014/sample.pas')
-rw-r--r--2ndary/THT/B/QG-2014/sample.pas21
1 files changed, 21 insertions, 0 deletions
diff --git a/2ndary/THT/B/QG-2014/sample.pas b/2ndary/THT/B/QG-2014/sample.pas
new file mode 100644
index 0000000..c8b5e17
--- /dev/null
+++ b/2ndary/THT/B/QG-2014/sample.pas
@@ -0,0 +1,21 @@
+uses dic;
+
+var
+  answer1: char;
+  answer2, answer3, answer4: longint;
+
+begin
+  answer1 := get_char_at_pos(4);
+  writeln('Vi tri thu 4 cua xau can tim la: ', answer1);
+
+  answer2 := count_char('c');
+  writeln('So luong ki tu c trong tu can tim la: ', answer2);
+
+  answer3 := count_char('a');
+  writeln('So luong ki tu a trong tu can tim la: ', answer3);
+
+  answer4 := count_char('n');
+  writeln('So luong ki tu n trong tu can tim la: ', answer4);
+
+  answer('can');
+end.