- General POLSKI Topic
- Excessive Plus 1.03 - Forcing custom expert.cfg / plus.cfg offline against bots (Win7)
- Quake All-stars December 2026 frag night
- Youtube
- add AI voice commentator to game
- JIVA's server invite players
- help me with rcon comman
- JIVA's games.log parser
- how many quake 3 players E+ still play sometimes
- DOOM 2 SERVER - UPDATE
Need quick help with C programming language!
Write in C language term: t= (5x-2y)/7z
Pls guys I need urgent help on this ![]()
I'm a bit rusty on C but this should work :
float t; t = (float) ( (5.0f*x - 2.0f*y) / 7.0f*z)
and make sure that x,y,z are also floats, else do a cast. Also z should never be zero! ![]()
there's an error: if the divider is 7z (7 multiplied by z), then should be:
t = (float) ( (5.0f*x - 2.0f*y) / (7.0f*z)); - feel the difference
this is because multiplication operators in C (* / %) are executed left-to-right (they have equal rank), so we must enclose last operand (7z) in brackets to force multiplication be calculated before division.
cheers
edit: also, you don't need that float cast - it's done automatically since your var is float. and all the subexpressions are at least float in this case.
Yes, the braces are necessary indeed, good finding! The casts aren't explicitly necessary, yes, they are just good practice so you could leave them out! ![]()
t = (float) ( (5.0f*x - 2.0f*y) / (7.0f*z));
true, did it fast ![]()
KURWA WHY NO JAVA OR PHP OR AS3 ? ![]()














Ty, u saved my best friend