Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399757
  • 博文数量: 83
  • 博客积分: 2011
  • 博客等级: 大尉
  • 技术积分: 741
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-04 22:51
文章分类

全部博文(83)

文章存档

2009年(83)

我的朋友

分类: LINUX

2009-07-18 15:55:19

以下是一个简单的例子:
#include
#include
int main()
{
 int i;
 int n;
 float x, y;
 
 scanf("%d", &n);
 for (i = 0; i < n; i++)
 {
  printf("please input the number\n");
  scanf("%f", &x);
  y = sqrt(x);
  printf("%f.....%f\n", x, y);
 }
}
 
 
编译方法:
gcc 3-2.c -o 3-2 -lm
阅读(1152) | 评论(0) | 转发(0) |
0

上一篇:女人在程序员眼里......

下一篇:随机数

给主人留下些什么吧!~~