Category : C Source Code
Archive   : C-TUTOR.ZIP
Filename : DEFINE.C

 
Output of file : DEFINE.C contained in archive : C-TUTOR.ZIP
/* Chapter 6 - Program 1 */
#define START 0 /* Starting point of loop */
#define ENDING 9 /* Ending point of loop */
#define MAX(A,B) ((A)>(B)?(A):(B)) /* Max macro definition */
#define MIN(A,B) ((A)>(B)?(B):(A)) /* Min macro definition */

main()
{
int index,mn,mx;
int count = 5;

for (index = START;index <= ENDING;index++) {
mx = MAX(index,count);
mn = MIN(index,count);
printf("Max is %d and min is %d\n",mx,mn);
}
}


  3 Responses to “Category : C Source Code
Archive   : C-TUTOR.ZIP
Filename : DEFINE.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/