码迷,mamicode.com
首页 > 其他好文 > 详细

test

时间:2019-02-23 10:29:25      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:整数   namespace   while   http   ||   clu   代码   www.   tps   

代码测试

 

https://www.cnblogs.com/liyuexi/p/10421628.html

#include <iostream>
using namespace std;

void main( )
{
    int n,i=1,f=1;
    char a;
    do
    {
    cout<<"请输入一个整数:";
    cin>>n;

    while (f<=n)
        {
        i=f*i;
        f++;
        }
    cout<<"n="<<n<<",n!="<<i<<endl;
    i=1;
    f=1;
    cout<<"还要算别的吗?【Y/N】";
    cin>>a;
    }
    while( a==y || a==Y);
}

 

test

标签:整数   namespace   while   http   ||   clu   代码   www.   tps   

原文地址:https://www.cnblogs.com/liyuexi/p/10421582.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!