Anonymous user
Multiplication tables: Difference between revisions
m
→{{header|C}}: using the * instead of sprintf in formats (reformatting as consequence of editing with emacs...)
(added Fortran) |
m (→{{header|C}}: using the * instead of sprintf in formats (reformatting as consequence of editing with emacs...)) |
||
Line 52:
<lang c>#include <math.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
int max = 12;
const char *format
const char *format2
int dgts;
int i,j;
dgts = (int)(.99+ log10(1.0*max*max));
for (i=1; i <= max; i++) printf(format, dgts, i);▼
▲ for (i=1; i<=max; i++) printf(format,i);
printf("\n\n");
for (j=1; j<=max; j++) {
}
printf("\n");
|