早教吧 育儿知识 作业答案 考试题库 百科 知识分享

一个while循环的PAD图下面是用PDL写出的程序,请画出对应的PAD图和NS图.WhileCdoIfA>0thenA1elseA2endifIfB>0thenB1IfC>0thenC1elseC2endifElseB2EndifB3Endwhile

题目详情
一个while循环的PAD图
下面是用PDL写出的程序,请画出对应的PAD图和N_S图.
While C do
If A>0 then A1 else A2 endif
If B>0 then
B1
If C>0 then C1 else C2 endif
Else B2
Endif
B3
Endwhile
▼优质解答
答案和解析
whlie(c)
{
if(a>0) a1;
else a2;
if(b>0)
{
b1;
if(c>0) c1
else c2;
}
else b2;
b3;
}
PAD图和盒图我就不画了 你学了软件工程的话 看这个代码就可以画出来了