home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 3
/
hamradioversion3.0examsandprograms1992.iso
/
freq
/
frq2
/
cell.c
next >
Wrap
C/C++ Source or Header
|
1989-01-26
|
2KB
|
74 lines
/*
* cell.c
*
* Version 1.1, Public Domain, 30 July 1988
* Steve Sampson, Compuserve 75136,626
* Distribution unlimited.
*
* This program prints a table of frequencies used by the
* Omni(tm) type of Cellular Telephone systems. Based on
* a description by Joe Bartlett, Compuserve 76703,4225.
*
* Compiled using Turbo-C V1.5, Works also under MSC V5.1
*/
#include <stdlib.h>
#include <stdio.h>
main()
{
register int i, j, chan, cell;
float rx_freq, tx_freq;
/*
* Turbo-C will combine all the strings, to save duplicated
* memory. That's why I made them this way.
*/
printf("Cellular Phone Band %c (Channel 1 is Data)\n", 'A');
for (cell = 1, i = 333; i > 312; i--) {
printf("\nCell # %d\n", cell++);
printf("--------------------------------------------------\n\n");
for (chan = i, j = 1; j < 17; j++, chan -= 21) {
if (chan < 1)
break;
rx_freq = ((float)chan * .030) + 825.000;
tx_freq = rx_freq + 45.000;
printf("Channel %d\t(%d)\tTx %3.3f\tRx %3.3f\n",
j, chan, tx_freq, rx_freq);
}
}
printf("\n\n");
printf("Cellular Phone Band %c (Channel 1 is Data)\n", 'B');
for (cell = 1, i = 334; i < 355; i++) {
printf("\nCell # %d\n", cell++);
printf("--------------------------------------------------\n\n");
for (chan = i, j = 1; j < 17; j++, chan += 21) {
if (chan > 666)
break;
rx_freq = ((float)chan * .030) + 825.000;
tx_freq = rx_freq + 45.000;
printf("Channel %d\t(%d)\tTx %3.3f\tRx %3.3f\n",
j, chan, tx_freq, rx_freq);
}
}
exit(0);
}
/* EOF */