Answer:
// program in C++.
#include <bits/stdc++.h>
using namespace std;
int main() {
// variable
int num;
cout<<"Enter the number between 20 and 98: ";
// read number
cin >> num;
while(num<20||num>98)
{
cout<<"Wrong input!!enter number between 20-98 only:";
cin>>num;
}
cout<<"The output is: ";
while(num % 10 != num /10)
{
// print numbers.
cout<<num<<" ";
// update num.
num--;
}
// display the number.
cout<<num<<endl;;
return 0;
}
Explanation:
Read a number from user and assign it to variable "num".Check if entered number is in between 20-98 or not.If input number is less than 20 or greater than 98 then ask again to enter a number between 20-98 until user enter a valid input.Then print the countdown from input number till both the digit of number are same.
Output:
Enter the number between 20 and 98: 99
Wrong input!!enter number between 20-98 only:12
Wrong input!!enter number between 20-98 only:93
The output is: 93 92 91 90 89 88
Enter the number between 20 and 98: 77
The output is: 77
Max()
------------------------------------------------------------
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>
Advantages of a Wireless Network<span> over Wired. As I mentioned in the introduction, the main </span>advantage of a wireless network<span> over a wired </span>one<span> is that users can move around freely within the area of the </span>network <span>with their laptops, handheld devices etc and get an internet connection.</span>
Answer:
1. PANs uses Star Topology.
2. LAN uses four topology (Bus, Ring, Star and Tree).
3. MAN uses Star Topology.
4. WAN uses Bus topology.
Explanation:
1. PAN is the personnel area network, in which different personnel devices of a person are connect to each other with the help of the central computer with the help of Bluetooth, WiFi or some other medium. The central computer will work like a hub and all the devices are directly connected to the central PC. It is same as the ring topology where all the devices are connected to the central PC. So we can say that, PANs use star topology.
2. LAN is the local area network that has been established with in the premises of the organization. In this type of network, four typologies involve to complete the network connection. First is star topology, that is used to connect all the devices with the switches. Then Bus topology is used to connect all the switches with the single main cable. Ring topology is involved to connect all the switches with each other. Tree topology is used to connect different block if the organization in the form of branch to connect the central router or switch.
3. MAN is the Metropolitan Area Network which is comprise of different LANs. All the LANs are connected to the Router in the form of Star topology.
4. WAN is the wide area network. In WAN different MANs are connected to the network through single cable. This type of network uses Bus topology.