-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain_function.cpp
More file actions
37 lines (35 loc) · 1.25 KB
/
main_function.cpp
File metadata and controls
37 lines (35 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
#include "shannonCapacity.h"
#include "bandwidth.h"
#include "Attenuation.h"
using namespace std;
int main(){
cout<<"This is a program that can calculate latency, throughput, bandwidth, capacity, attenuation and noise\n";
int choice;
while(true){
cout<<"Select choice function according to the number\n";
cout<<"1. Attenuation\t2. Noise SNR and Distortion\n3. Latency\t4. Throughput\n5. Bandwidth\t6.Channel capacity Using Nyquist Formula\n7.Channel Capacity using Shannon's Formula\t8. End\n";
cin>>choice;
switch(choice){
case 1: attenuation();cout<<endl;
break;
case 2: noise();cout<<endl;
break;
case 3: latency();cout<<endl;
break;
case 4: throughput();cout<<endl;
break;
case 5: bandwidth();cout<<endl;
break;
case 6: nyquist();cout<<endl;
break;
case 7: shannonCapacity();cout<<endl;
break;
case 8: cout<<"Ending Program\n";exit(0);
default: cout<<"Invalid choice...Please try again\n";
}
}
return 0;
}