Continue例题
来源:互联网 发布:微信运动数据来源 编辑:程序博客网 时间:2024/05/08 21:50
1、输出最大值、最小值 和 平均值
#include <stdio.h>int main(void){const float MIN = 0.0f;const float MAX = 100.f;float score;float total = 0.0f;int n =0;float min = MAX ;float max = MIN;printf("Enter the first score(q to quit):");while(scanf("%f",&score)==1){if(score < MIN||score >MAX){printf("%0.1f is an invalid value.Try again:",score);continue;}printf("Accepting %0.1f:\n",score);min = (score<min)?score:min;max = (score>max)?score:max;total +=score;n++;printf("Enter next score(q to quit):");}if(n>0){printf("Average of %d scores is %0.1f.\n",n,total/n);printf("Low = %0.1f, High = %0.1f\n",min,max);}else printf("No valid scores were entered.\n");return 0 ;}
- Continue例题
- break与continue例题
- continue
- continue
- continue
- continue
- Continue
- #continue
- continue
- continue
- Continue
- continue
- continue
- 例题
- 例题
- 例题
- 例题
- continue break
- 详细记录listview的各种Adapter
- Mono for Android 视频基础教程
- 合并两个排序数组
- Twitter的系统编程
- Android自定义进度条-带文本(文字进度)的水平进度条(ProgressBar)
- Continue例题
- postgresql 数据导入导出
- 如何打开Native层的LOGV
- Version 1.5.0_07 of the JVM is not suitable for this product. Version: 1.6 or greater is required.
- Inno setup 常用修改技巧
- Android ListView 视图缓存
- 新学习的css元素
- Android中PopupWindow的用法(位置、动画、焦点)
- 关于内存分配的几个例子