单选题Phil has x quarters, y dimes, and z nickels and nothing else. Which of the following expressions represents the amount of money that Phil has, in dollars?A0.25x + 0.10y + 0.05zB2.5x + 1. 0y + 0.5zC25x + 10y + 5zD0.25x + 0.10y + 0.5zE25x + 10y + 50z

单选题
Phil has x quarters, y dimes, and z nickels and nothing else. Which of the following expressions represents the amount of money that Phil has, in dollars?
A

0.25x + 0.10y + 0.05z

B

2.5x + 1. 0y + 0.5z

C

25x + 10y + 5z

D

0.25x + 0.10y + 0.5z

E

25x + 10y + 50z


参考解析

解析:
Multiply the value of each coin by the number of coins and add. 0.25x + 0.10y + 0.05z.

相关考题:

有以下程序: void f(int v,int w) { int t; t=v;V=W;W=t; } main() { int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); printf("%d,%d<%d\n",x,y,Z); } 执行后输出结果是( )。A.1,2,3B.3,1,2C.1,3,2D.2,3,1

有以下程序:include void f(int v, int w){int t; t=v; v=w; w=t;}main(){int x=1,y=3 有以下程序: #include <stdio.h> void f(int v, int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); printf("%d,%d,%d\n",x,y,z); } 执行后的输出结果( )。A.1,2,3B.3,1,2C.1,3,2D.2,3,1

下列程序的运行结果是( )。 main() { int a=-5,b=1,c=1; int x=0,y=2,z=0; if(c>0)x=x+y; if(a<=0) { if(b>O) if(c<=0)y=x-y; } else if(c>0)y=x-y; else z=y; printf("%d,%d,%d\n",x,y,z); }A.2,2,0B.2,2,2C.0,2,0D.2,0,2

下列程序的运行结果是 #include"stdio.h" main() { intx=-9,y=5,z=8; if(x<y) if(y<0)z=0; else z+=1; printf("%d\n",z);}A.6B.7C.8D.9

有以下程序 include mare() { int x=1,y=2,z=3; if(x>y) if 有以下程序 #include <stdio.h> mare() { int x=1,y=2,z=3; if(x>y) if(y<z) printf("%d",++z); else printf("%d",++y); printf("%d\n",x++); } 程序的运行结果是______。A.331B.41C.2D.1

关于下面的程序 include main() { int x=3,y=0,z=0; if(x=y+z)printf("****"); else p 关于下面的程序 #include<stdio.h> main() { int x=3,y=0,z=0; if(x=y+z)printf("****"); else printf("$$$$"); }说法正确的是______。A.有语法错误不能通过编译B.输出****C.输出$$$$D.可以通过编译,但不能通过连接,无法运行

以下错误的if语句是:A.if(x>y) z=x;B.if(x==y) z=0;C.if(x!=y) printf("%d",x) else printf("%d",y);D.if(x

当下面的程序运行后,变量c的值为______。 main () { int a=45, b=27, c=0; c=max (a, b); } int max (x, y) int x,y; { int z; if (xy) z=x; else z=y; return(z); }A.45B.27C.0D.72

计算z的值,当x大于等于y时,z=x;否则z=y。下列语句错误的是( )A.If x>=y Then z=x:z=yB.If x>=y Then z=x Else z=yC.z=y:If x>=y Then z=xD.If x<y Then z=y Else z=x

下列程序的运行结果是#include "stdio.h"main( ){ int x=-9,y=5,z=8;if(x<y)if(y<0) z=0;else z+=1;printf("%d\n",z);}A.6B.7C.8D.9

与y=(x>0? 1:x0)y=1 else if(x 与y=(x>0? 1:x<0? -1:0);的功能相同的if语句是A.if(x>0)y=1 else if(x<0)y=-1; else y=O;B.if(x) if(x>0)y=1; else if(x<0)y=-1;C.y=-1; if(x) if(x>0)y=1; else if(x==0)y=0; else y=-1;D.y=0; if(x>=0) if(x>0)y=1; else y=-1;

与y=(x>0?1:x0)y=1; else if(x 与y=(x>0?1:x<0?-1:0):的功能相同的if语句是( )A.if(x>0)y=1; else if(x<0)y=-1; else y=0; else y=0;B.if(x) if(x>0)y=1; else if(x<0)y=-1;C.y=-1; if(x) if(x>0)y=1; else if(x==0)y=0; else y=-1;D.y=0; if(x>=0) if(x>0)y=1; else y=-1:

下面程序执行的结果是( )。 CLEAR X=5 Y=6 Z=7 IF X>Y IF Z>8 X=X+Y ELSE X=X+Z ENDIF ENDIF ?XA.5B.11C.12D.13

计算z的值,当x大于y时,z=x;否则z=y。下列语句错误的是( )A. If x>=y Then z=x : z=yB If x>=y Then z=x Else z=yC. z=y : If x>=y Then z=xD. If x

计算z的值,当x大于y时,z=x;否则z=y。下列语句错误的是A.If x=y Then z=x:z=yB.If x=y Then z=x Else z=yC.z=y:If x=y Then z=xD.If x=y Then z=y Else z=x

对于下面的程序,说法正确的是 include void main( ) {int x=3,y=4,z=2; i 对于下面的程序,说法正确的是 #include<iostream.h> void main( ) { int x=3,y=4,z=2; if(X=y+z) cout <<"x=y+Z"; else cout<<"x!=y+Z";}A.不能通过编译B.输出6C.输出x! =y+zD.输出x=y+z

有以下程序 void f(int v,int w) { int t; t=v;v=w;w=t } main() {int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); pfintf("%d,%d,%d\n",x,y,2); } 执行后输出结果是A.1,2,3B.3,1,2C.1,3,2D.2,3,1

假设有函数模板定义如下,下列各选项中正确的是( )。 Template T Max(T a,T b,T 假设有函数模板定义如下,下列各选项中正确的是( )。 Template <class T> T Max(T a,T b,T c) { if(a<b) {if(b<c) return c; else return b;} else {if(a<c) return c; else return a;} }A.float x,y,z;float max;max=Max(x,y,z);B.float x;int y,z;float max;max=Max(x,y,z);C.float x;double y,z;float max;max=Max(x,y,z);D.三个选项都正确

设计下列伪程序的语句覆盖测试用例。 BEGIN INPUT(A,B,C) IF A5 THEN X=10 ELSE X=1 END IF IF B10 THEN Y=20 ELSE Y=2 END IF IF C15 THEN Z=30 ELSE Z=3 END IF PRINT(X,Y,Z) END

执行以下语句后z的值是()。Intx=24,y=36,z=8;if(xy){z=x;}else{z=y;}。A、24B、36C、8D、16

以下不能实现符号函数y=sgn(x)的程序段是()。A、if x0 then y=1 else if x=0 then y=0 else y= -1B、if x0 then y=1 else if x0 then y= -1 else y=0C、if x=0 then if x=0 then y=0 else y= -1 else y=1D、if x0 then if x0 then y= -1 else y= 1 else y=0

请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t1 x=10 else x=1; if b10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }

问答题A jar contains 30 coins, of which 20 are nickels and 10 are dimes. If 7 coins are removed, how many nickels are left?  (1) More nickels are removed than dimes.  (2) The remaining coins in the jar are worth $1.55.

单选题In a wallet containing nickels and dimes, the ratio of nickels to dimes is 2:5. If there are 42 coins in all, what is the value of the dimes?A$1. 20B$3. 00C$1. 50D75€E30€

问答题请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }

单选题有以下程序 void f(int v,int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(xy) f(x,y); else if(yz) f(y,z); else f(x,z); printf("%d,%d,%d/n",x,y,z); }执行后输出结果是()A1,2,3B3,1,2C1,3,2D2,3,1

问答题设计下列伪程序的语句覆盖测试用例。 BEGIN INPUT(A,B,C) IF A5 THEN X=10 ELSE X=1 END IF IF B10 THEN Y=20 ELSE Y=2 END IF IF C15 THEN Z=30 ELSE Z=3 END IF PRINT(X,Y,Z) END

单选题Phil has x quarters, y dimes, and z nickels and nothing else. Which of the following expressions represents the amount of money that Phil has, in dollars?A0.25x + 0.10y + 0.05zB2.5x + 1. 0y + 0.5zC25x + 10y + 5zD0.25x + 0.10y + 0.5zE25x + 10y + 50z