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:
Please check the attachment.
Explanation:
The adjacency matrix is the matrix that has nodes as rows and columns. The nodes if connected is stated as 1 or else 0. And the adjacency list representation is the list with nodes and connected nodes. The nodes that are not connected are not being listed. The diagram and list as well as matrix can be found in the attachment.
Answer:
a)None
b)All
this is ur answer from my opinion