Answer:
Written using C++
/*Enter Your Details Here*/
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
//1
float side;
cout<<"Enter the side of a square: ";
//2
cin>>side;
//3
float perimeter = 4 * side;
cout<<"The perimeter is "<<perimeter<<endl;
//4
float area = side *side;
cout<<"The area is "<<area<<endl;
//5
float diagonal = sqrt(2 * side * side);
cout<<"The length of the diagonal is "<<diagonal;
return 0;
}
Explanation:
<em>I've added the full source code as an attachment where I used more comments to </em><em>explain </em><em>difficult line</em>
Answer:
import java.util.Scanner;
public class num12 {
public static void main(String[] args) {
Scanner scr = new Scanner(System.in);
System.out.println("Enter a Deposit Amount");
double amt = scr.nextDouble();
System.out.println("Income tax in percentage");
double incomeTaxRate = scr.nextDouble()/100;
System.out.println("Yearly interest rate:");
double rate = scr.nextDouble();
double intRate = rate/100;
double interest = (amt*intRate)-(amt*incomeTaxRate);
System.out.println("The Interest on "+amt+" at "+rate+"% after one year is "+interest);
}
}
Explanation:
Find the sample output attached
Java's Scanner class is used to prompt and receive values for deposit amount, income tax rate and interest rate
The yearly interest is calculate by interest = (amt*intRate)-(amt*incomeTaxRate);
Answer:
Topology means arrangement of nodes
Explanation:
In computer science the word topology means the arrangement of nodes and elements in a network. For any topology we do need nodes and cables for maintaining the infrastructure.
In mesh topology the all nodes use to get connected by direct link. While each and every node is directly associated with one another. In this infrastructure we do need lot cabling where every node will be connected with one another. While usage of good quality cable in network is also expensive to manage. Although there are lot of benefits of this topology, where the transmission of data would never stop if node is not working the rest will be working to transfer the data among other nodes ,this is more secure because there is no traffic for data to travel via many nodes to reach the destination. Every node is directly connected and communicate. So, once the node is not working the communication will not be stop but the maintenance and troubleshooting will be difficult in this infrastructure.
It is proved along with lot of benefits and network security ,this infrastructure is having some disadvantages as well. Cabling expense , maintenance cost etc . usually small scale networks do not prefer mesh topology. Small scale and low budget companies can not afford this topology because it is expensive.
Although we do believe that the data security is most important for today's era ,so few companies those wanted to keep their information secure and confidential they must use mesh topology by ignoring the cost incurred for this set up. Data security and integrity would never be compromised by some of the companies.
Mesh topology is more safer, more quick infrastructure which is although very expensive , difficult to mange and maintain. Moreover it is overhead of cabling as well to connect every node but the demand of mesh topology would never be less. It is demanding and appealing topology still.
Wiki is the correct answer