Bump to doxygen 1.9.2
[platform/upstream/doxygen.git] / testing / snippet_test.cpp
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 void main()
5 {
6   int i,n,temp,j,arr[25];
7   printf("Enter the number of elements in the Array: ");
8   scanf("%d",&n);
9   printf("\nEnter the elements:\n\n");
10
11   /* [input] */
12   for(i=0 ; i<n ; i++)
13   {
14     printf(" Array[%d] = ",i);
15     scanf("%d",&arr[i]);
16   }
17   /* [input] */
18
19   // [bubble]
20   for(i=0 ; i<n ; i++)
21   {
22     for(j=0 ; j<n-i-1 ; j++)
23     {
24       if(arr[j]>arr[j+1]) //Swapping Condition is Checked
25       {
26         temp=arr[j];
27         arr[j]=arr[j+1];
28         arr[j+1]=temp;
29       }
30     }
31   }
32   // [bubble]
33
34   printf("\nThe Sorted Array is:\n\n");
35   /* [output] */
36   for(i=0 ; i<n ; i++)
37   {
38     printf(" %4d",arr[i]);
39   }
40   /* [output] */
41 }