Professional Documents
Culture Documents
Q1: Process Start (On P11 (S1 ) On P12 (S2 ) ) Process S1 (On P21 (S2 ) ) Process S2 (On P22 (Exit ) ) Process Exit (Destroy )
Q1: Process Start (On P11 (S1 ) On P12 (S2 ) ) Process S1 (On P21 (S2 ) ) Process S2 (On P22 (Exit ) ) Process Exit (Destroy )
Process Start()
{
On P11()
{
S1()
}
On P12()
{
S2()
}
}
Process S1()
{
On P21()
{
S2()
}
}
Process S2()
{
On P22()
{
Exit()
}
}
Process Exit()
{
Destroy()
}
Q2:
Public int P(int a, int b, int C )
{
If(a>b) Then C=a-b
Else if (a=b) Then C=0
Else C=b-a
Return C
}