Code:
/* Process the data */
int processData(int *dat) {
int loop;
int res = 0;
for(loop = 0; loop < 30; loop++) {
res += (dat[loop] ? (dat[loop] - 50) : 69) ? dat[loop] : 69;
while (res > 300000) {
res -= dat[loop] ? dat[loop] : 169;
}
}
return *res;
}
/* Process the data */
int processData(int *dat) {
int loop;
int res = 0;
for(loop = 0; loop < 30; loop++) {
res += (dat[loop] ? (dat[loop] - 50) : 69) ? dat[loop] : 69;
while (res > 300000) {
res -= dat[loop] ? dat[loop] : 169;
}
}
return *res;
}
Imam jedan problem, radi se o jednom puzzle site-u, molio bi da mi netko malo pomogne kod ove stvari, naime malo matematicki.
processData funkcija citha 30 linija iz jednog file-a (numerickih)
dat[loop]
znaci res se povecava odnosno smanjuje ako je vechi od 300000
- je minus
+ je plus
: je podeljeno (celibroji ili float ?)
? je operacija, koju treba da nadjem !
Pomoc je potrebna za ':', dali je rezultat celi broji (rounded) ili float ?
Pozdrav StratOS
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications."
"The one who is digging the hole for the other to fall in is allready in it."
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications."
"The one who is digging the hole for the other to fall in is allready in it."