WEEK6 作业
来源:互联网 发布:生物圈二号 知乎 编辑:程序博客网 时间:2024/05/16 05:36
1、
#include "stdio.h"main(){int x; printf("输入一个整数:"); scanf("%d",&x); printf("%o %x %d",x,x,x);}2、
#include "stdio.h"main(){ float x; printf("please input:"); scanf("%f",&x); printf("%8.3f",x); printf("%09.3f",x); }
3、
#include "stdio.h"main(){ int x; printf("please input:"); scanf("%d",&x); if (x>-1&&x<10) printf("ok"); else printf("not ok");}
4、
#include "stdio.h"main(){ int x; printf("please input:"); scanf("%d",&x); if(x>1000) printf("big"); if(x>=100&&x<=1000) printf("middle"); if(x<100) printf("small");}
5、
#include "stdio.h"main(){ int a; printf("please input:"); scanf("%d",&a); switch(a) { case 1:printf("January\n");break; case 2:printf("February\n");break; case 3:printf("March\n");break; case 4:printf("April\n");break; case 5:printf("May\n");break; case 6:printf("June\n");break; case 7:printf("July\n");break; case 8:printf("August\n");break; case 9:printf("September\n");break; case 10:printf("Optober\n");break; case 11:printf("November\n");break; case 12:printf("December\n");break; default :printf("not valid month number"); }}
6、
#include "stdio.h"main() { int a; int sum=0; for(a=2;a<=100;a=a+2) sum=sum+a; printf("sum is %d",sum); }
7、
#include "stdio.h"void main(){ int a,b; b=0; a=2; while(a<=100) { b=b+a; a=a+2; } printf("%d",b);}
8、
#include "stdio.h"void main(){ int a,b; a=2; b=0; do{ b=b+a; a=a+2; }while(a<=100); printf("%d",b);}
0 0
- WEEK6 作业
- 作业 week6
- week6 作业
- Week6作业
- Coursera机器学习 week6 编程作业代码
- week6
- Stanford 机器学习 Week6 作业:Regularized Linear Regression and Bias v.s. Variance
- [Coursera机器学习]Regularized Linear Regression and Bias v.s. Variance WEEK6编程作业
- algorithm week6
- week6 练习
- week6-week11
- junior-week6
- Leetcode Week6
- leetcode week6
- Algorithm-week6
- Summary for week6
- 【Week6】淋湿的纸
- Week6-1Probabilities
- SmartPointer
- 转载--我的求职路:华为、中兴、百度、腾讯
- 九度1533
- OutOfMemory异常的几种情况
- 日期函数详解
- WEEK6 作业
- Button的使用(一):直接添加到Activity
- 请听一个故事------>讲述一段失败的创业经历 ,希望你能从中受到启发
- 第4周作业-数学学习工具
- Hive使用
- 日期时间脚本库方法列表
- Struts2中Action result各种转发类型
- ListView项不能完全填充的问题
- android R.java居然报错,Underscores can only be used with source level 1.7 or greater