• 2021-04-14 问题

    【填空题】下列程序的输出结果是________。#include<iostream>usingnamespacestd;intf(inta,intb){staticintx=3;if(b>2){x=x*x;b=x;}elseb=x+1;returna+b;}intmain(){inta=3,b;b=2;cout<<f(a,b)<<endl;b=3;cout<<f(a,b);return0;}

    【填空题】下列程序的输出结果是________。#include<iostream>usingnamespacestd;intf(inta,intb){staticintx=3;if(b>2){x=x*x;b=x;}elseb=x+1;returna+b;}intmain(){inta=3,b;b=2;cout<<f(a,b)<<endl;b=3;cout<<f(a,b);return0;}

  • 1