zoukankan
html css js c++ java
计算s=n*(n1)*(n2)*.....1 分类: python 20121213 20:29 171人阅读 评论(0) 收藏
#! /usr/bin/env python
#coding=utf-8
#s=n*(n-1)*(n-2)*.....1
s=1
while True:
n=input('Input your Number:')
if n<=0:
print '请输入正整数'
continue;
else:
while n>=1:
s*=n
n-=1
break; #计算过s=n*(n-1)*(n-2)....1后退出循环
print s
版权声明:本文为博主原创文章,未经博主允许不得转载。
查看全文
相关阅读:
作为一名JAVA程序员应该有怎样的就业思维
Html +++++css总结
spring知识点全部复习
Spring注解问题,[action中注入service失败
VMware中Ubuntu18配置静态IP地址
MySQL5.7修改登录密码的几种方式
MySQL忘记root密码
Windows安装Redis
Java两个整数相除保留n位小数
Java四舍五入保留n位小数的常用写法
原文地址:https://www.cnblogs.com/think1988/p/4628263.html
最新文章
Windows Internet Information Services(IIS) 与 inetpub 文件夹
Oracle
<form onSubmit="return check(this);"> 与 <input type="submit" onclick="return check(this);"/>
Missing space before function parentheses space-before-function-paren
Unexpected trailing comma
Strings must use singlequote
error Missing space before function parentheses space-before-function-paren
火狐怎么设置为默认浏览器
box-shadow:
padding:
热门文章
border-radius
{border:1px solid #eee;}
transform:translate(-50%,-50%),left:50% top:50%
h5问题汇总
小程序实时监控距离顶部的距离
兼容安卓和苹果的滚动
解决iphone 微信H5自动播放音乐问题
检测当前浏览的平台
JSP +++SERVIET总复习
struts2知识点复习
Copyright © 2011-2022 走看看