All pastes #456482 Raw Edit

Mine

public c v1 · immutable
#456482 ·published 2007-04-24 20:58 UTC
rendered paste body
/*ID: djthyra1LANG: CTASK: ride*/#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){    char cometa[6], ufo[6], lawl[6];    int cometalen, ufolen, a, x, temp;    	FILE *fp = fopen ("ride.in", "r");    fgets(cometa, 100, fp);    fgets(ufo, 100, fp);    fclose(fp);    	cometalen = strlen(cometa)-1;    ufolen = strlen(ufo)-1;    	temp = 1;	for(a = 0; a<cometalen; a++) temp = (temp * (((int) (cometa[a]))-64));    printf("%s - %i\n", cometa, temp);    x = temp;    	temp = 1;    for(a = 0; a<ufolen; a++) temp = (temp * (((int) (ufo[a]))-64));    printf("%s - %i\n", ufo, temp);    	fp = fopen ("ride.out", "w");    if(temp%47 == x%47) fputs("GO\n", fp);    else fputs("STAY\n", fp);    fclose(fp);//    system("PAUSE");     exit(0);}