更改错误提示等级

eclipse 更改某个错误的提示等级(比如“Permission is only granted to system apps”)
解决方法:
修改下Link Error Checking项的安全级别;
In Eclipse: Window -> Preferences -> Android -> Lint Error Checking
,在ID列表中,找到ID = ProtectedPermission,设置Serverity低于Error,比如Warning级别就好了。

参考网址:http://blog.csdn.net/gaojinshan/article/details/14230673

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我理解了你的问题。以下是if语句和switch语句实现该程序的代码,以及能正确处理任何数据的代码。 if语句实现: ``` #include <stdio.h> int main() { int score; printf("请输入学生的考试成绩:"); scanf("%d", &score); if (score >= 0 && score <= 100) { if (score >= 90) { printf("该学生的等级为A\n"); } else if (score >= 80) { printf("该学生的等级为B\n"); } else if (score >= 70) { printf("该学生的等级为C\n"); } else if (score >= 60) { printf("该学生的等级为D\n"); } else { printf("该学生的等级为E\n"); } } else if (score < 0) { printf("输入数据错误!\n"); } else { printf("输入数据错误!\n"); } return 0; } ``` switch语句实现: ``` #include <stdio.h> int main() { int score; printf("请输入学生的考试成绩:"); scanf("%d", &score); if (score >= 0 && score <= 100) { switch (score / 10) { case 10: case 9: printf("该学生的等级为A\n"); break; case 8: printf("该学生的等级为B\n"); break; case 7: printf("该学生的等级为C\n"); break; case 6: printf("该学生的等级为D\n"); break; default: printf("该学生的等级为E\n"); break; } } else if (score < 0) { printf("输入数据错误!\n"); } else { printf("输入数据错误!\n"); } return 0; } ``` 能正确处理任何数据的代码: ``` #include <stdio.h> int main() { int score; printf("请输入学生的考试成绩:"); while (scanf("%d", &score) == 1) { if (score >= 0 && score <= 100) { switch (score / 10) { case 10: case 9: printf("该学生的等级为A\n"); break; case 8: printf("该学生的等级为B\n"); break; case 7: printf("该学生的等级为C\n"); break; case 6: printf("该学生的等级为D\n"); break; default: printf("该学生的等级为E\n"); break; } } else if (score < 0) { printf("输入数据错误!\n"); break; } else { printf("输入数据错误!\n"); } printf("请输入学生的考试成绩:"); } printf("程序结束!\n"); return 0; } ``` 希望这些代码能够帮助你解决问题。如果你还有其他问题,请随时问我。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值