翻译 高额的
发布网友
发布时间:2022-04-24 08:31
我来回答
共1个回答
热心网友
时间:2022-06-18 01:22
有个C的
/* From input file "<stdin>" */
#include <p2c/p2c.h>
Static Char a[10][256];
Static long b[10], c[10];
Static Char man[256];
Static long np, i, j, m, r, l, p;
Static long pd(Char *s)
{
long Result = 0;
long i, FORLIM;
FORLIM = np;
for (i = 1; i <= FORLIM; i++) {
if (!strcmp(s, a[i-1])) {
Result = i;
/* p2c: <stdin>, line 10:
* Warning: Expected a '(', found a semicolon [227] */
/* p2c: <stdin>, line 10:
* Warning: Expected an expression, found a semicolon [227] */
fflush(0);
P_ioresult = 0;
}
}
return Result;
}
main(int argc, Char *argv[])
{
long FORLIM, FORLIM1;
PASCAL_MAIN(argc, argv);
rewind(stdin);
/* p2c: <stdin>, line 14: Note: REWRITE does not specify a name [181] */
/* p2c: <stdin>, line 14:
* Note: RESET/REWRITE ignored for file OUTPUT [319] */
if (stdout == NULL)
_EscIO(FileNotFound);
scanf("%ld%*[^\n]", &np);
getchar();
FORLIM = np;
for (i = 1; i <= FORLIM; i++)
gets(a[i-1]);
FORLIM = np;
for (i = 1; i <= FORLIM; i++) {
gets(man);
l = pd(man);
scanf("%ld%ld%*[^\n]", &b[l-1], &r);
getchar();
if (r == 0) {
continue();
/* p2c: <stdin>, line 22: Warning: Symbol 'CONTINUE' is not defined [221] */
}
c[l-1] += b[l-1] - b[l-1] / r * r;
FORLIM1 = r;
for (j = 1; j <= FORLIM1; j++) {
gets(man);
c[pd(man) - 1] += b[l-1] / r;
}
}
FORLIM = np;
for (i = 1; i <= FORLIM; i++)
printf("%s %12ld\n", a[i-1], c[i-1] - b[i-1]);
if (stdin != NULL)
fclose(stdin);
stdin = NULL;
if (stdout != NULL)
fclose(stdout);
stdout = NULL;
exit(EXIT_SUCCESS);
}