c语言
冰上的fire
这个作者很懒,什么都没留下…
展开
-
c语言2 printf
题目:从键盘输入一个数,求其绝对值 错误代码: #include using namespace std; int main() { while (true) { float t; printf("please enter a number \n"); scanf("%f",&t); if(t>0) t=t; else t=-t; printf("this is原创 2015-12-07 22:41:01 · 274 阅读 · 0 评论 -
c语言摄氏度华氏度转换
近期,打算重新学习c语言,之前直接学的c++,并没有c的基础,所以在编写的时候遇到了一些错误,现记录下来。 题目:你的朋友要去某地旅游,当地天气预报是用华氏,请编写程序,计算相应的摄氏度。 错误代码: #include using namespace std; int main() { printf("Please enter fahrenhit\n"); float celsi原创 2015-12-07 21:54:21 · 11211 阅读 · 1 评论 -
冒泡排序简易代码
include using namespace std; void tmp(int *number1,int *number); int main() { int number[10]; int n; cout cin >> n; for (int i = 0; i { cin >> number[i];原创 2016-05-20 19:26:55 · 389 阅读 · 0 评论