我需要绘制以下代码的DD路径图:
#include <iostream.h>
#include<conio.h>
main()
{
char name[16]; #1
int age; #2
cout << "Enter your name: "; #3
cin >> name; #4
cout << "Enter your age: "; #5
cin >> age; #6
if (age < 21) #7
cout << "You young whippersnapper, " << name << "!\n"; #8
else if (age < 40) #9
cout << name << ", you're still in your prime!\n"; #10
else if (age < 60) #11
cout << "You're over the hill, " << name << "!\n"; #12
else if (age < 80) #13
cout << "I bow to your wisdom, " << name << "!\n"; #14
else #15
cout << "Are you really " << age << ", " << name << "?\n"; #16
return 0; #17
} #18
我得到的DD路径图如下:
我不确定它是否是正确的图表。任何人都可以验证吗?