#include <stdio.h> long long func(int n); // 函数声明 int main() { int n; long long f; while (scanf("%d", &n) != EOF) { f = func(n); // 函数调用 printf("n = %d, f = %lld\n", n, f); } return 0; } long long func(int n) { long long f=1; if(n==1) f=1; else if(n>1) f=2*func(n-1)+1; return f; }
标签:return,int,long,实验,函数调用,func From: https://www.cnblogs.com/261003z/p/17798350.html