The name of your C program file must be called fromdec1.c, files with any other name will not be marked.
After this, write a program to convert a base-10 (decimal) number to its base-n equivalent, where 2 <= n <= 9.
2 0 2 1 2 3 2 85 2 488 2 511 8 0 8 1 8 9 8 83 8 14853748 5 015086 9 387420488We will of course test your programs with different test data.
Look at the sample run below and use your inference and deductive skills to figure out the format of the text file as well as the data it contains.
$ gcc -Wall fromdec1.c -o fromdec1 $ ./fromdec1 Decimal number 0 has value of 0 in base 2. Decimal number 1 has value of 1 in base 2. Decimal number 3 has value of 11 in base 2. Decimal number 85 has value of 1010101 in base 2. Decimal number 488 has value of 111101000 in base 2. Decimal number 511 has value of 111111111 in base 2. Decimal number 0 has value of 0 in base 8. Decimal number 1 has value of 1 in base 8. Decimal number 9 has value of 11 in base 8. Decimal number 83 has value of 123 in base 8. Decimal number 14853748 has value of 70523164 in base 8. Decimal number 15086 has value of 440321 in base 5. Decimal number 387420488 has value of 888888888 in base 9. $
A total of 11 different hosts have accessed this document in the last 445 days; your host, nsrp-source.comp.nus.edu.sg, has accessed it 3 times.
If you're interested, complete statistics for this document are also available, including breakdowns by top-level domain, host name, and date.