تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
دورة بلغة Java
#11
هذا الموقع يعمل جيدا معي
شكرا لك اخي
الرد }}}
تم الشكر بواسطة:
#12
السلام عليكم ورحمة الله وبركاته

الحمد لله تم رفع باقي اجزاء الدورة لنفس الموقع

6-جزء6

7-جزء7

8-جزء8

9-جزء9

10-جزء10

تحياتي
الرد }}}
تم الشكر بواسطة: abulayth
#13
الروابط غير شغالة
الرد }}}
تم الشكر بواسطة:
#14
الرد }}}
تم الشكر بواسطة:
#15
PHP كود :
public static void main(String[] args) {

    
System.out.println("Enter the number of nodes in the graph");
    
Scanner scanner = new Scanner(System.in);
    
int number_no_nodes scanner.nextInt();

    
int adjacency_matrix[][] = new int[number_no_nodes 1][number_no_nodes 1];

    
//--------------------------------------

    
System.out.println("Enter the adjacency matrix");

    for (
int i 1<= number_no_nodesi++)
    {
        for (
int j 1<= number_no_nodesj++)
        {
            
adjacency_matrix[i][j] = scanner.nextInt();
        }
    }

    
//--------------------------------------

    
System.out.println("Enter the source for the graph");
    
int source scanner.nextInt();

    
//--------------------------------------

    
Queue<Integerqueue = new LinkedList<>();

    
int[] visited = new int[number_no_nodes 1];

    
int element;

    
visited[source] = 1;
    
queue.add(source);

    
System.out.println("The BFS graph is ");

    while (!
queue.isEmpty())
    {
        
element queue.remove();

        
System.out.print(element "\t");

        for(
int i=element;i<=number_no_nodes;i++)
        {
            if (
adjacency_matrix[element][i] == && visited[i] == 0)
            {
                
queue.add(i);
                
visited[i] = 1;
            }

        }

    }


الرد }}}
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: