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

关于调用函数

时间:2014-11-23 18:50:13      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:io   sp   bs   amp   nbsp   return   ca   函数   print   

#include <stdio.h>
int main ()
{
    int number(int c);
    int n;
    scanf("%d",&n);
    printf("%d\n",number(n));
    return 0;
}
int number(int c)
{
    int a,b=1;
    while(c>1)
    {
        a=(b+1)*2;
        b=a;
        c--;
    }
    return(a);
}

关于调用函数

标签:io   sp   bs   amp   nbsp   return   ca   函数   print   

原文地址:http://www.cnblogs.com/szz-55555/p/4117092.html

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