Standard Deviation Program with Pascal  

Posted by: DK in ,

In statistics and probability, standard deviation or standard deviation is a measure of statistical distribution of the most common. In short, he measured how the data values spread. Standard deviation is defined as the square root of variance. Standard deviation is non-negative integer, and has the same units as the data. For example, if a data is measured in meters, then the standard deviation is also measured in meters as well. The term was first standard deviation introduced by Karl Pearson in 1894, in his book On the Dissection of Asymmetrical frequency curves. like the previous exercise program will be made here to calculate the standard deviation, or better known as the standard deviation by using the programming language pascal. Here is the complete source code:

Program Calculate_the_standard_deviation;
Uses Crt;
Var X,N,I:Byte;
Akar,Jum,Rata,Sd,K,Y,Sigma,Pangkat:Real;
Data:Array[1..30] of byte;
Function Pengurangan(A,I:Byte):Integer;
Begin
Pengurangan:= A-I ;
end;
Procedure NilaiData;
Begin
Write (’What is the number of Data Value= ‘);Readln(X);
For N:=1 to x do
Begin
Write(’Data to-’,N,’=');Readln(Data[N]);
end;
end;
Procedure RataRata;
Begin
Jum:=0;
For N:=1 to X do
Begin
Jum:=Jum + Data[N] ;
Rata:= Jum / X;
end;
end;
Procedure PangkatSigma;
Begin
SIGMA:=0;
For N:= 1 to X do
Begin
Pangkat:=0;
K:= Data[N]-Rata;
Pangkat:= SQR (K);
Sigma:= Sigma+Pangkat;
end;
end;
Procedure TampilHasil;
Begin
For N:= 1 to X Do
Begin
Writeln (’Value data to- ‘,N,’=',Data[N]);
end;
end;

Begin
clrscr;
Sigma:=0;
Rata:=0;
Writeln (’>> Calculating Standard Deviation <<’);
NilaiData; RataRata; PangkatSigma; I:=1; Y:=Pengurangan(X,I); Akar:=Sigma/Y ; Sd:= SQRT (Akar);
Clrscr;
Writeln (’Standard Deviation Calculation Results’);
TampilHasil;
Writeln (’The number of Data Value =’,X);
Writeln (’Value Average rating = ‘,Rata:4:2);
Writeln (’Standard deviation is = ‘,Sd:4:2);
Readln;
end.
Copyright © Dede Kurniadi

Read More...

Total Seconds Conversion Program to Hour with Pascal  

Posted by: DK in ,

Still practicing with the pascal programming language, in practice this time, I will create a program to convert the total number of seconds to hours, this program was made at the request of my blog readers who enter your e-mail, complete the following source code:

Program Konversi_Total_detik_ke_Jam;

type Jam=record
hh:longint; {0..23}
mm:longint; {0..59}
ss:longint; {0..59}
end;
var
J:Jam;
total_detik:longint;
sisa:longint;

Begin
Write (’Total detik = ‘); readln (total_detik);
J.hh:=total_detik div 3600;
sisa:=total_detik mod 3600;
J.mm:=sisa div 60;
J.ss:=sisa mod 60;
Write (J.hh,’ : ‘,J.mm,’ : ‘,J.ss);
Readln;
end.
Copyright © Dede Kurniadi

Read More...

Bom video explosion in Mega Kuningan Jakarta  

Posted by: Master Situs in

Although my late posting about the tragedy bomb explosion in Jakarta, no one if you want to watch video seconds of a bomb explosion. Video following the explosion in the JW Marriott Hotel and the Ritz-Carlton, Mega Kuningan, this video is a special tragedy suicide bomb explosion that occurred in the last indonesia.


Read More...