main() { inta=12,b=-64,c=56,max=0; max=a; if(b>max) max=b; if(c>max) max=c; printf("max=%d",max);} 运行结果为:______
A: 12
B: -64
C: 56
D: 0
A: 12
B: -64
C: 56
D: 0
举一反三
- 下面程序的运行结果是: int a=3,b=2,max; if (a>b) max=a; else max=b; printf("max=%d",max); A: max=%d B: max=3 C: 3 D: max=2
- 当输入10,11,12时,下面程序运行结果是 【6】 。#include <iostream>using namespace std;int main(){ int a,b,C,max; Cin>>a>>b>>c; max=a; if(max<b) max=b; if(max<c) max=c; cout<<max<<end1; return 0;
- 10、以下程序的运行结果是( )#include <;stdio.h>;void main(){ int a=1,b=2,c;c=max(a,b);printf(“max is %d\n”,c);}max(int x, int y){ int z;z=(x>;y)? x:y;return(z);} A: max is 2 B: max is 1 C: max is 3 D: max is 12
- 执行以下程序,如果输入为23 48 32,则输出结果为。#include<;stdio.h>;int max(int a,int b,int c);int main(){int a,b,c;scanf("%d%d%d",&a,&b,&c);printf("%d\n",max(a,b,c));return 0;}int max(int a,int b,int c){int max;max=a>;b?a:b;if(c>;max)max=c;return max;}
- 在C#中,下列代码运行后,变量max的值是()inta=5,b=10,c=15,max=0;max=a>b?a:b;max=c A: 0 B: 5 C: 10 D: 15