You may do all of the given options.
Thank You!
Answer: A
Explanation: For any formal document you need your major points.
Answer:
class Main {
public static void printPattern( int count, int... arr) {
for (int i : arr) {
for(int j=0; j<count; j++)
System.out.printf("%d ", i);
System.out.println();
}
System.out.println("------------------");
}
public static void main(String args[]) {
printPattern(4, 1,2,4);
printPattern(4, 2,3,4);
printPattern(5, 5,4,3);
}
}
Explanation:
Above is a compact implementation.
Answer:
Explanation:
a)use order by clause for sorting
for $x in doc("books.xml")/bib/book order by xs:float($x/price) return $x/title (default sorted in ascending order)
or
for $x in doc("books.xml")/bib/book order by xs:float($b/price) descending return $b/title (sorted in descending order)
b)doc("books.xml")//book[author = 'Abiteboul']
c)for $x in distinct-values(doc("bib.xml")/bib/book/author)
return <res>
<name>{$x}</name>
<count>
{count (doc("bib.xml")//book[exists(indexof(author,$x))]) }
</count>
<res>