Explanation:
We can divide the multiplex in different categorize, for example:
- FREQUENCY DIVISION MULTIPLEXERS (FDM)
-
TIME DIVISION MULTIPLEXERS (TDM)
-
STATISTICAL TIME DIVISION MULTIPLEXERS (STDM).
But in this case, we're going to explain about the time and frequency, because the time division multiplex differ to frequency, because the circuit is divided horizontally, and the time is vertically
b. splits the communication circuit vertically (with time slots) instead of horizontally
import random
def random_number_file_writer(nums):
f = open("random.txt", "w")
i = 0
while i < nums:
f.write(str(random.randint(1,500))+"\n")
i += 1
f.close()
def random_number_file_reader():
f = open("random.txt", "r")
total = 0
count = 0
for x in f.readlines():
total += int(x)
count += 1
print("The total of the numbers is "+str(total))
print("The number of random numbers read from the file is "+str(count))
def main():
random_number_file_writer(int(input("How many random numbers do you want to generate? ")))
random_number_file_reader()
main()
I hope this helps!
Answer:
#include <iostream>
using namespace std;
int main()
{
int side1=0;
int side2=0;;
int side3=0;
cout <<"Enter side one measurement";
cin >> side1;
cout <<"Enter side two measurement";
cin >> side2;
cout <<"Enter side three measurement";
cin >> side3;
if(side1+side2>side3||side1+side3>side2||side2+side3>side1){
if (side1==side2 && side2==side3)
{
cout <<"equilateral triangle"<<endl;
}
else if(side1==side2||side2==side3||side1==side3){
cout <<"Isosceles triangle"<<endl;
}
else{
cout <<"scalene triangle"<<endl;
}
}else{
cout<<"No triangle";
}
return 0;
}
Explanation:
The code is written in c++. It takes measurements of each side from users as input and check the types of triangle based on the following formula.
1. Equilateral Triangle
If all sides of a triangle are equal than it's an equilateral triangle.
2. Isosceles Triangle
If any two sides of a triangle are equal than it's an Isosceles triangle.
3. Scalene Triangle
If all the sides of a triangle are of different length than it's an Scalene triangle.
In a triangle the sum of two sides is greater than third side otherwise it's not a triangle.