void Input() { char computer[20]; do{ printf("请输入你的设备信息:\n"); printf("计算机设置编号:"); scanf("%s",&com[count].no); printf("设备名称:"); scanf("%s",&com[count].name); printf("设备单价:"); scanf("%f",&com[count].dj); printf("设备数量:"); scanf("%d",&com[count].num); printf("设备金额:"); scanf("%f",&com[count].jine); count++; printf("是否继续收集数据 y是 n否:"); scanf("%s",computer); }while(strcmp(computer,"y")==0||strcmp(computer,"Y")==0); Save(); Menu(); }请据此画出流程图
时间: 2023-07-18 20:45:29 浏览: 88
好的,根据代码,我为您画出了以下流程图:
```
+---------+
| Start |
+---------+
|
|
+---------------+
| do...while() |
+---------------+
|
|
+-----------------------+
| printf("请输入你的设备信息:\n"); |
| printf("计算机设置编号:"); |
| scanf("%s",&com[count].no); |
| printf("设备名称:"); |
| scanf("%s",&com[count].name); |
| printf("设备单价:"); |
| scanf("%f",&com[count].dj); |
| printf("设备数量:"); |
| scanf("%d",&com[count].num); |
| printf("设备金额:"); |
| scanf("%f",&com[count].jine); |
| count++; |
| printf("是否继续收集数据 y是 n否:"); |
| scanf("%s",computer); |
+-----------------------+
|
|
+--------------+ +-------+
| strcmp()==0 | | End |
+--------------+ +-------+
| No
|
+-----------------------+
| Save(); |
| Menu(); |
+-----------------------+
|
|
+---------+
| End |
+---------+
```
希望这个流程图能够帮助您更好地理解代码的执行流程。如有其他问题或需要进一步帮助,请随时告诉我。
阅读全文