变量与输入
来源:互联网 发布:全套钓鱼工具淘宝 编辑:程序博客网 时间:2024/05/16 16:54
[root@mysql1 perl]# ./10.pl
what is the radius? 0
the circumference of a circle of radius 0 is 0.
[root@mysql1 perl]# ./10.pl
what is the radius? 1
the circumference of a circle of radius 1 is 6.283185308.
[root@mysql1 perl]# ./10.pl
what is the radius? 2
the circumference of a circle of radius 2 is 12.566370616.
[root@mysql1 perl]#
[root@mysql1 perl]#
[root@mysql1 perl]#
[root@mysql1 perl]# cat 10.pl
#!/usr/bin/perl -w
$pi=3.141592654;
print "what is the radius? ";
chomp($radius=<STDIN>);
$circ=2 * $pi * $radius;
print "the circumference of a circle of radius $radius is $circ.\n";
what is the radius? 0
the circumference of a circle of radius 0 is 0.
[root@mysql1 perl]# ./10.pl
what is the radius? 1
the circumference of a circle of radius 1 is 6.283185308.
[root@mysql1 perl]# ./10.pl
what is the radius? 2
the circumference of a circle of radius 2 is 12.566370616.
[root@mysql1 perl]#
[root@mysql1 perl]#
[root@mysql1 perl]#
[root@mysql1 perl]# cat 10.pl
#!/usr/bin/perl -w
$pi=3.141592654;
print "what is the radius? ";
chomp($radius=<STDIN>);
$circ=2 * $pi * $radius;
print "the circumference of a circle of radius $radius is $circ.\n";
0 0
- 变量与输入
- 输入变量与if
- 循序渐进学Python2变量与输入
- 从C++转向java——2、输入与变量
- C++ string类型变量的输入与输出
- C++ string类型变量的输入与输出
- Java 输出输入、变量与数据类型、运算符
- 替代变量输入
- nargin 输入变量个数
- 指针变量输入字符串
- Oracle关闭&变量输入
- 获取系统输入变量
- 通过函数完成对结构体变量的输入与输出
- Day3、C语言数据类型、变量的输入与输出、进制的转换
- C语言基础学习基本数据类型-变量的输出与输入
- 关于C++中输入与变量类型不匹配的解决办法
- 指针变量与变量
- 变量与延迟变量
- unity编辑器扩展 SVN自动更新工具
- 《第一行代码Android》--细节整理
- Scala集合操作—List
- word修改正文样式影响标题样式
- JAVA中关于set()和get()方法的理解及使用
- 变量与输入
- ItelliJ IDEA + MAVEN + TortoiseSVN配置
- js实现图片的无缝滚动
- Chain模式,EIT造型模式Patter,Factory 模式,public ,private
- MATLAB数组的创建
- Java调用天气接口(百度天气)解析返回的JSON数据
- VS2013 编译 Win32程序,如何配置版本等信息
- Android CalendarView 属性
- “不给力啊,老湿!”:RSA加密与破解