Monday, 27 October 2014

Algoritma Pascal Program Hitung Kata dan Kalimat

22:14

Pada kesempatan ini,TS mengambil sedikit waktu luang buat posting algoritma dalam bahasa pemrograman Pascal.Saat ini TS akan share mengenai Algoritma Program Hitung Kata dan Kalimat.Jika sobat masih bingung dengan logika nya,maka copy dan pelajari saja algoritma yang TS share.

Program MenghitungKatadanKalimat;
Uses crt;
Var
I : real;
A,B,C,D,E,F,G,H : Integer;
karakter : Char;
Begin
clrscr;
Writeln('Program Hitung Kata dan Kalimat');
Writeln('-------------------------------');
G:=2;
While G=2 DO
Begin
Write('Masukan Karakter : '); Readln(Karakter);
F:=F+1;
Case Karakter OF
     '1','2','3','4','5','6','7','8','9','0':A:=A+1;
     'A','I','U','E','O','a','i','u','e','o':B:=B+1;
     'B','C','D','F','G','H','J','K','L','M','N','P','Q','R','S','T','V','W','X','Y','Z','b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z':C:=C+1;
     ',',':',';','<','>','/','\','?','!','~','@','#','$','%','^','&','(',')','-','_','=','+':D:=D+1;
     ' ':I:=I+1;
     '.':E:=E+1;
     Else
     E:=E-1;
     I:=I+0.5;

End;
IF (Karakter='x') OR (Karakter='X') Then
Begin
Writeln('Anda Telah Menekan X');
Writeln('Jumlah Inputan          : ',F);
Writeln('Jumlah Vokal            : ',B);
Writeln('Jumlah Konsonan         : ',C);
Writeln('Jumlah Angka            : ',A);
Writeln('Jumlah Karakter Special : ',D);
Writeln('Jumlah Kata             : ',I:0:0);
Writeln('Jumlah Kalimat          : ',E);
G:=1;
Readln;
End;
End;
Writeln('-------------------------------');
Readln;
End.


Voila...Program tercompile dengan successfull.Selamat belajar.

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

1 comments:

  1. Hard Rock Hotel & Casino - MapyRO
    Find Harrah's Cherokee Casino, Hotel & 전주 출장마사지 Spa, Cherokee near 경기도 출장마사지 Murphy on MapyRO. Find out more about 제주 출장안마 the 영주 출장마사지 property - Address, Map, Map of Murphy and 김제 출장마사지 nearby casinos.

    ReplyDelete

 

© 2013 Keep Calm and Sharing. All rights resevered. Designed by Templateism

Back To Top