average sum = (average 1 + average 2)/2
Printable View
average sum = (average 1 + average 2)/2
Nope. Even if average was typedef'd, 1 and 2 aren't legal identifiers and you can't just sum these newly declared variables. Also the statement is missing a semicolon at the end.
If you're just simply talking in generics, than that's sample code for about any program language you can think of.
oh...so its not goin' to work..what can i do to make it a code....
You can start by actually learning C++ from a book rather than just kinda guessing...
exam average = ( exam_1 + exam_2)/2;
Sure, that could *possibly* be legal C++. But do you know how to make it legal? I would guess no.
no....not reallie...i have a book ..but it doesn't exam much
fahrenheit - 9/5 centgrade +32 ....is dat correct code
Please stop guessing and get a real book.
thanks for ur help man....
Don't give that sarcasm. There are some really helpful and smart people on this board...you just asked a bad question
http://www.catb.org/~esr/faqs/smart-questions.html
Yeah, seriously... not everyone is like me.Quote:
Originally Posted by MadCow257
one more thing..
whats ++3.14?
u add 3. 14 twice
No, you can't increment a constant.
would add 1 to whatever var1's value was.Code:++var1;
the ++ is only used with variables. and it increments their values by one.
++ is really += 1