下述程序的结果为( )。int f(int x){ st...%d, n); return 0;}
举一反三
- 下列程序的运行结果为 int f (int n) { if (n==0) return n; else return f(n-5)+n; } int main( ) { printf("%d",f(15)); }
- #include <;stdio.h>;int fun(int x);int main(){ printf("%d",fun(4)); return 0;}int fun(int x){ if(x==1)return 3; return x*x+fun(x-1);}程序输出结果为( )
- 执行以下程序后,输出结果为。#include<;stdio.h>;int n;void f();int main(){n=0;f();n=n+2;printf("%d\n",n);return 0;}void f(){n=n+5;}
- 以下程序的输出结果是______ 。#include int f(int n) { if(n == 1) return 1; else return n + f(n - 1);}int main(void) { printf("%d\n", f(5)); return 0;}
- 以下程序没有语法问题的是() A: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}