The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
(Telephony) In a directly connected telephone network, all telephones are directly connected and don’t require a central switching station to establish calls between two telephones. The number of lines needed to maintain a directly connected network for n telephones is given by this formula:
![]()
For example, directly connecting four telephones requires six separate lines (see Figure 2.15). Adding a fifth telephone to this network requires an additional 4 lines, for a total of 10 lines.

a. Using the given formula, write a C++ program that determines the number of lines required for directly connecting 100 telephones. The input for this problem is the number of telephones, denoted as n in the formula, and the output is the total number of lines required to directly connect the input number of telephones.
b. Compile and execute the program written for Exercise 3a.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll