F1=1，F2=1，F(n)=F(n-2)+F(n-1)

Input

Output

liunx_hello F1 F2 应该加括号吧 F(1) F(2)
6 个月之前 回复

unsigned int int1=-9;rn int int2=-9;rn signed char char1='s';rn wchar_t char2='中';rn char char3='s';rn unsigned char char4='白';rn cout << int1 << endl;rn cout << int2 << endl;rn cout << char1 << endl;rn cout << char2 << endl;rn cout << char3 << endl;rn cout << int2+char4 << endl;rn cout << int2+int1 << endl;

def fib(n): L=[] a,b=1,1 while len(L)<n: L.append(a) a,b=b,a+b print L print L[-1]if __name__=='__main__': fib(10)

using System;rnrnnamespace facrnrn /// rn /// Class19 的摘要说明。rn /// rn public class Facrn rn rn public long fac(long n)rn rn long x=0;rn if(n==1)rn rn x=1;rn rn elsern rn x=n*fac(n-1);rn rn return x;rn rn public static void Main()rn rn long n=0;rn rn while(n<12)rn rn rn rn Console.WriteLine("please input number 00 && n<12) rn rn myFac.fac(n);rn Console.WriteLine("0,1",n,myFac.fac(n-1));rn rn elsern rn Console.WriteLine("out of range!\n");rn rn Console.WriteLine("please enter leave\n");rn rn rn rnrn可以编译成.exe文件，可是当输入5！=？就没有输出.？？

#includenusing namespace std;nint main()nint sum(int a[5][5],int b[5][5]);nint i,j,g[5][5],h[5][5],d[5][5];nfor(i=0;i<5;i++)nfor(j=0;j<5;j++)n cin>>g[i][j];n n ncout<>h[i][j];n n ncout<<"矩阵和"<
[算法题]输出斐波那契数列的第N项

#include&lt;stdio.h&gt; #define M 100 //递归法 int Fibo1(int n) { if(n==1||n==2) { return 1;//递归终止条件 } else { return Fibo1(n-1)+Fibo1(n-2);//递归 } } //非递归法 in...

string s;rn rn while(getline(fin,s))rn rn double d;rn while(fin>>d)rn cout<

Private Sub Form_Load()rn For i = 1 To 100rn S = S + irn Nextrn Print SrnEnd Subrnrn为何窗体上看不到计算结果输出来

[code=C/C++][/code]rn#include "stdio.h"rn#define s8 charrnstatic int k = 0;rnmain()rnrn s8 i = 0;rn for(i=0;i<128;i++)rn rn k += i&3; rn rn printf("%d\n",k);rnrn这代码有什么问题，为什么没有输出结果？

declarern v_f_name emp.ename%type;rn v_f_job emp.job%type;rn cursor ci --声明游标，没有参数没有返回值rn isrn select ename,job from emp where deptno=20;rn rn beginrn open ci;rn loop rn fetch ci into v_f_name,v_f_job;rn if ci%FOUND thenrn dbms_output.put_line(v_f_name||'的岗位是'||v_f_job); rn elsern dbms_output.put_line('已经处理完结果集了'); rn exit;rn end if;rn end loop;rn close ci;rn rn end;rnrnrnrnrn为什么没有输出结果;rn只显示rnrnPL/SQL 过程已成功完成rn

stack segment stackrn stack endsrn data segmentrn ALout db 'Please putin a Dnum:',0ah,0dh,24hrn crlf db 0ah,0dh,24hrn string db 30rn db 0rn db 30 dup('\$' )rn data endsrn code segment rn assume cs:code,ds:data,ss:stackrn start:rn mov ax,datarn mov ds,ax rn rn mov dx,offset ALoutrn mov ah,09hrn int 21hrn rn mov ah,0ahrn int 21hrn rn rn mov ah,09hrn mov dx,offset crlfrn int 21hrn mov bx ,offset stringrn mov ax ,[bx+2]rn mov bl,alrn mov cl,4rn shr al,clrn add al,30hrn mov dl,alrn mov ah,02hrn int 21hrn rn mov ah,09hrn mov dx,offset crlfrn int 21hrn rn or bl,0fhrn add bl,30hrn mov dl,blrn mov ah,02hrn int 21hrn code endsrn end startrnrnrnrnrnrn

rn#include rnmain()rn rn int i,n;rn char aa[]="This is a program";rn char bb[2]="a";rn for(i=0; ;i++)rn rn if(bb[0]==aa[i])rn rn n=i;rn break;rn rn rn printf("%d",n);rnrn为什么n的值是8不是9呢？

int k,j,s;rnfor (k=2; k<6; k++,k++)rn s=1rn for (j=k; j<6; j++) s+=j;rnrnprintf("%d\n",s);rn输出结果是6对吗？？？

【Java】输出n项斐波那契数列
import java.util.Scanner; public class 递归 { //求第n个斐波那契数 static int fabnaci(int n) { if(n==0)return 0; if(n==1)return 1; return fabnaci(n-1)+fabnaci(n-2); } public static void main(String[] a...

#include &amp;lt;stdio.h&amp;gt;int main(){    int i,n;    printf(&quot;请输入你想计算的阶乘：\n&quot;,n);    scanf(&quot;%d&quot;,&amp;amp;n);    double fact(int);    for(i=0;i&amp;lt;=n;i++){        printf(&quot;%d!=%lf\n&quot;,i,fact(i));    }}double fac...

package jing.able; import java.io.*; import java.util.Scanner; /** * @author: panjing * @describe: * @date: 2019/5/17 * @time: 19:42 */ public class PrintStreamTest { public static void ma...

Car ShumaCar=new Car();这句我看的懂rnShumaCar.objEngine=new Engine("Ferrari 050 v10");rn是什么意思rn

class Foo rn int i = 0;rnrnrnpublic class Bar extends Foorn int i = 1;rn public static void main(String[] args) rn Foo foo = new Bar();rn System.out.println(foo.i);rn rn

#includernrn class carrn rn public:rn car(int j)size=j;rn int put()return size;rn protected:rn int size;rn ;rn class boatrn rn public:rn boat(int j)size=j;rn int put()rn return size;rn protected:rn int size;rn ;rn int leisure(int time,car& aobj,boat& bobj)rn rn return time*aobj.put()*bobj.put();rn rn void maint()rn car c1(1);rn boat b1(1);rn int time=4;rn cout<

vc下用ATL COM向导生成一个.DLL程序，添加了一个空的接口及其方法，执行rn出现了一个“Executable For Debug Session”的对话框，要求我“specify the executable file”,请问这是怎么回事？rn怎样才能没有此对话框，执行后直接生成.DLL 文件呢

#includernvoid main()rnint map[3][3] = 1,2,3,4,5,6,7,8,9;rnint **pmap = map;rnprintf("%d\n",pmap[4]);rnrnrnrnrn疑问是 pmap是指向指针的指针，对它进行一次解引用，应该是地址，为什么答案是5呢？rnrn求好心人

\$(function () rnrn \$("#category").change(function () rn \$.get("/MyForm/GetExpenseList", pid: \$(this).children('option:selected').val() , function (data, status) rn \$("#formType").html(data);rnrn )rn );rnrnrn var table = \$('.listtable2').DataTable(rn "processing": true,rn "serverSide": true,rn "bInfo": false,rn searching: false,rn pageLength: 12,rn lengthChange: false,rn columnDefs: [rn orderable: false,//禁用排序rn targets: [0] //指定的列rn ],rn "order": [],rn "ajax": "@Url.Action("GetAllApprovedFormList")?" + \$(".indexform").serialize(),rn columns: [rn data: 'temp_0' rn , data: 'temp_1' rn , data: 'temp_2' rn , data: 'temp_3' rn , data: 'temp_4' rn , data: 'temp_5' rn , data: 'temp_6' rn , data: 'temp_7' rn ]rn );rnrn \$("#this_cmd_search").click(function () rn table.ajax.url("@Url.Action("GetAllApprovedFormList")?" + \$(".indexform").serialize()).load();rn );rnrn );rn

#include "iostream.h"rnrnint main() rnrn bool boolalpha = false;rnrn char str1[] = "abc";rn char str2[] = "abc";rn const char str3[] = "abc"; rn const char str4[] = "abc"; rn const char* str5 = "abc";rn const char* str6 = "abc";rn rn boolalpha = str3==str4;rn rn cout << boolalpha <<":"<< ( str1==str2 ) << endl; rn cout << boolalpha <<":"<< ( str3==str4 ) << endl;rn cout << boolalpha <<":"<< ( str5==str6 ) << endl;rnrnrn/** out:rn 0 : 0rn 0 : 0rn 0 : 1rn **/rn rn rn

#include &amp;lt;stdio.h&amp;gt;int main(){    int i,j;    int n;//自定义行数，可灵活输出杨辉三角    printf(&quot;请输入你想输出的行数：\n&quot;);    scanf(&quot;%d&quot;,&amp;amp;n);    int a[n][n];    printf(&quot;\n&quot;);    for(i=0;i&amp;lt;n;i++)     {        a[i][...

1只需要添加#include&lt;windows.h&gt; 2然后在printf();后面添加Sleep(10000)就行 只需要添加#include&lt;windows.h&gt; 然后在printf();后面添加Sleep(10000)就行

#include rn#include rn#include rnifstream fin("in.txt");rnrnint main()rnrn int n; //数据个数rn float x,xx; //数据，xx为预测值rn int p; //自回归模型的阶数rn float k;//设定的k值rn float a; //自回归系数rn float mse1=0,mse2=0;//方差，差额小于1%程序结束rn int i,j;rnrn fin>>n;rn for(i=0;i>x;rn fin>>p>>k;rn for(i=0;i>a;rnrn while(1)rn rn mse1=0;rn for(i=p;i0.99 && mse1/mse2<1.01)rn break;rn mse2=mse1;rn rn rn for(i=0;i>n;rnrnrnrnrnrnrn没有任何输出结果，这是怎么回事啊？[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/9.gif][/img]rnC++是刚学的语言，真心受伤！希望各位大虾帮忙，给给意见！[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/16.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/8.gif][/img]