1、分别画出程序的软件流程图、NS图、PAD图;
程序
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv[])
{int Edge_a,Edge_b,Edge_c;printf("Input three int type data between space:\n");scanf("%d %d %d",&Edge_a,&Edge_b,&Edge_c);if(Edge_a>0 && Edge_b>0 && Edge_c>0){if(Edge_a+Edge_b>Edge_c && Edge_b+Edge_c>Edge_a && Edge_c+Edge_a>Edge_b){if(Edge_a == Edge_b){if(Edge_b == Edge_c)printf("Equilateral Triangle.\n");elseprintf("Isosceles Triangle.\n");}else{if(Edge_b == Edge_c)printf("Isosceles Triangle.\n");else{if(Edge_a == Edge_c)printf("Isosceles Triangle.\n");elseprintf("General Triangle.\n");}}}elseprintf("Invalid Triangle.\n");}elseprintf("Invalid Input.\n");system("PAUSE");return EXIT_SUCCESS;
}
2、依据下例画出对应的判定树和判定表。
判定表: