Files
Digital-Research-Source-Code/MPM OPERATING SYSTEMS/MPM-86/MISC DRI DISKS/03/TEST.C
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

36 lines
1.1 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

int i,j;
long l,k;
float f,g;
double d,e;
main()
{
printf("************************************************\n");
printf("** WELCOME TO DIGITAL RESEARCH C **\n");
printf("** **\n");
printf("** This sample program tests the C compiler, **\n");
printf("** linker and libraries. If the number in **\n");
printf("** parentheses matches the number to the **\n");
printf("** immediate left, each component is working **\n");
printf("** properly. **\n");
printf("************************************************\n");
printf("\n");
printf("Test int math: 4567 * 10 = "); i = 4567; j = 10;
printf("%u (45670)\n",i * j);
printf("Test long int math: 1234 * 4567 = "); l = 1234; k = 4567;
printf("%ld (5635678)\n",l * k);
printf("Test float math: 1.234 + 0.001 = "); f = 1.234; g = 0.001;
printf("%g (1.235)\n",f + g);
printf("Test double math: 5635678.0 / 1234.0 = ");
d = 5635678.0;
e = 1234.0;
printf("%g (4567)\n",d / e);
printf("\nGood Luck!\n");
}