80、请运行Python软件,写出下列表达式的结果: (1) round(2.5,0)=____ (2) round(3.5,0)=____ (3) int(2.5)=____ (4) int(3.5)=____
80、请运行Python软件,写出下列表达式的结果: (1) round(2.5,0)=____ (2) round(3.5,0)=____ (3) int(2.5)=____ (4) int(3.5)=____
参考答案和解析
A
相关考题:
比较MAX(2,4,6,8,10)、ROUND(8.5,0)、INT(8.5)、ABS(-11)的大小,正确顺序为( )。A.ABS(-11)<ROUND(8.5,0)<INT(8.5)<MAX(2,4,6,8,10)B.ABS(-11)<INT(8.5)<ROUND(8.5,0)<<MAX(2,4,6,8,10)C.INT(8.5)<ROUND(8.5,0)<MAX(2,4,6,8,10)<ABS(-11)D.ROUND(8.5,0)<INT(8.5)<MAX(2,4,6,8,10)<ABS(-11)
请写出如下程序的输出结果:#includeint a[]={2,4,6,8,10};int index(int i){ return a[i];}void main(){int i;index(3)=12;for (i=0;i=4;i++)cout
设有如下变量定义: double a=3.500000;float b=2.5; int m=2,n=3; 则表达式“(float)(m+n)/2+(int)a%(int)b”的值是( )A.2.5B.3.5C.4.5D.表达式不正确
请选出以下程序的输出结果includemain(){ int a[]={1,2,3,4},i;int x=0;for(i=0;i 请选出以下程序的输出结果 #include<stdio.h> main() { int a[]={1,2,3,4},i; int x=0; for(i=0;i<4;i++) { sub(a,x);printf("%d",x);} printf("\n");} sub(s,y) int*s,y; { static int t=3; y=s[t];t--; }A.1 2 3 4B.4 3 2 1C.0D.4444
下列程序的运行结果是()。includevoid sub(int*s,int*y){static int m=4;*y=s[0];m++;} 下列程序的运行结果是( )。 #include<stdio.h> void sub(int*s,int*y) {static int m=4; *y=s[0]; m++; } void main() {int a[]={1,2,3,4,5},k; int x; printf("\n"); for(k=0;k<=4;k++) {sub(a,x); printf("%d,",x); } }A.1,1,1,1,1,B.1,2,3,4,5,C.0,0,0,0,0,D.4,4,4,4,4,
下列程序的运行结果是()。includevoid sub(int*s,int*y){static int m=4:*y=s[m];m--;} 下列程序的运行结果是( )。 #include<stdio.h> void sub(int*s,int*y) {static int m=4: *y=s[m]; m--; } void main() {int a[]={1,2,3,4,5},k,x; printf("\n"); for(k=0;k<=4;k++) {sub(a,x); printf("%d,",x); } }A.5,4,3,2,1,B.1,2,3,4,5,C.0,0,0,0,0,D.4,4,4,4,4,
若有定义:int a=2,b=3;float x=3.5,y=2.5;则下面表达式的值为______。(float)(a+b)/2+(int)x%(int)yA.3.5B.35C.3.5D.35
下列程序运行的结果为:public class test {public static void main(String args[]) {int i;float f = 2.3f;double d = 2.7;i = ((int)Math.ceil(f)) * ((int)Math.round(d));System.out.println(i);}} A. 4B. 5C. 6D. 6.1E. 9
下列程序的运行结果是______。include int Func(int *a,int n) {int s=1; for(int i=0 下列程序的运行结果是______。include<iomanip.h>int Func(int *a,int n){int s=1;for(int i=0;i<n;i++)s*=*a++;returns;}void main(){inta[]:{1,2,3,4,5,6,7,8};intb=Func(a,6)+Func(a[5],2);cout<<“b=“<(b<<endl;}
单选题Round(-3.5)的结果是()A3.5B-4C-3.5D-3