题目内容
(请给出正确答案)
[主观题]
在下面程序的横线处填上适当的内容。使其输出结果为“0,56,56”。
请帮忙给出正确答案和分析,谢谢!
答案
查看答案
请帮忙给出正确答案和分析,谢谢!
第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
第7题
下面程序对数组中的每个元素赋值,然后按逆序输出。请在横线处填入适当内容,使程序能正常运行。
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) ;
}
}
第10题