流程如图。自己也试着写了一些,但是问题不少,求指点。我写的代码如下:
int DataInput()
{
int i;
char a;
start:printf("输入一个字符:\n");
scanf("%c",&a);
for(i=1;i<=Nums;i++)
{
if(a>=48&&a<=57)
{
goto step1;
}
else
{
goto step4;
}
step1:intArray[Nums];
printf("输入一个字符:\n");
scanf("%c",&a);
goto step2;
step2:if(a>=48&&a<=57)
{
goto step1;
}
else
{
goto step3;
}
step3:int queue(char intArray[],char N1[]);goto start;
step4:if((a>=0xB0A1&&a<=0xD7FE)||(a>=0xA1A1&&a<=0xA3FE)||(a>=0xA8A1&&a<=0xA8C0))
{
int queue1(char intArray[],char N2[]);goto start;
}
else
{
goto step5;
}
step5:if(a>=0xD8A1&&a<=0xF7FE)
{
int queue1(char intArray[],char N3[]);goto start;
}
else
{
goto step6;
}
step6:if(a>=0x8140&&a<=0xFE7E||a>=0x8180&&a<=0xFEFE)
{
int queue1(char intArray[],char N4[]);goto start;
}
else
{
goto step7;
}
step7:if(a>=0x81308130&&a<=0xFE39FE39)
{
int queue1(char intArray[],char N5[]);goto start;
}
else
{
goto step8;
}
step8:printf("报错:不合法数据\n");
}
return 0;
}
求解,怎么把这个大循环写好呢
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- shen_wei 2017-05-25 07:12关注
char a; for (int i = 0;i < 10;i++) { scanf("%c",&a); if (a >= 48 && a <= 57) { //queue } else if((a >= 0xB0A1 && a <= 0xD7FE)||(a>=0xA1A1&&a<=0xA3FE)||(a>=0xA8A1&&a<=0xA8C0)) { //queue1 } else if(a>=0xD8A1&&a<=0xF7FE) { //queue2 } else if(a>=0x8140&&a<=0xFE7E||a>=0x8180&&a<=0xFEFE) { //queue3 } else if(a>=0x81308130&&a<=0xFE39FE39) { //queue4 } }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
- ¥20 软件测试决策法疑问求解答
- ¥15 win11 23H2删除推荐的项目,支持注册表等
- ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
- ¥15 qt6.6.3 基于百度云的语音识别 不会改
- ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
- ¥15 神经网络怎么把隐含层变量融合到损失函数中?
- ¥15 lingo18勾选global solver求解使用的算法
- ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
- ¥20 测距传感器数据手册i2c