在下面程序中的横线处填上适当内容,使程序完整。
请帮忙给出正确答案和分析,谢谢!
请帮忙给出正确答案和分析,谢谢!
第1题
下面程序对数组中的每个元素赋值,然后按逆序输出。请在横线处填入适当内容,使程序能正常运行。
import java.io.*;
public class ArrayTest{
public static void main(String args[]){
int i;
int a[] = new int[5];
for(i=0;i<5;i++)
a=i;
for(______i>=0; i--)
System. out .println ("a ["+i+"] ="a) ;
}
}
第3题
请在以下程序第一行的下划线处填写适当内容,使程序能正确运行。 【 】 (double, double); main() { double x, y; scanf("% lf % lf", &x, &y); printf("% 1f\n", max(x, y)); } double max(double a, double b) { return(a>b? a:b); }
第4题
如下为拓扑排序的C程序。 (1)列出对右图执行该程序后的输出结果。 (2)在程序空白处填上适当语句。 void topsort(hdnodes graph[],int n) {int i,J,k,top;node pointer ptr; top=-1; for(i=0; i<n; i++) if(!graph[i].count){graph[i].count:top;top=i;) for (1=0; 1<n; 1++) if①(fpri
第5题
(2)能被400整除。
第6题
根据所提供的发音部位和发音方法,在下面横线处填上相应的声母。
1.双唇、送气、清、塞音是()。
2.舌尖后、清、擦音是()。
3.舌尖中、浊、边音是()。
4.舌尖后、浊、擦音是()。
5.舌面前、不送气、清、塞擦音是()。
第7题
下列程序的功能是判断某一年是否为闰年。请在横线处填入适当内容,使程序能够正确运行。
import java.io.*;
public class LeapYear{
public static void main(String arge[])throws IOExceptionl
InputStreamReader ir;
BufferdeReadwe in;
ir=new InputStreamReader(System.in ;
in=new BufferedReader(ir);
System. out.println("输入年份是: ");
String s=______
int year=Integer.parseInt (s) ;
if(year%4==0&&year%100!=0//year%400==0)
{
System.out.println(""+year+"年是闰年.");
}
else
{
System. out.println (""+year+"年不是闰年.. ") ;
}
}
第9题
第10题
下面程序段执行完毕,我们在浏览器中看到的内容是什么?()
<%
Response.Write"<ahref='http://www.sina.com.cn'>新浪</a>"
%>
A.新浪
B.<ahref='http://www.sina.com.cn'>新浪</a>
C.新浪
D.该句有错,什么也不显示