This shows you the differences between two versions of the page.
— |
qna:lab-session:code7 [2024/04/25 11:13] (current) xallos created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <code c># | ||
+ | int main() { | ||
+ | int x = 123; | ||
+ | int hlp; | ||
+ | |||
+ | if (x > 10) { | ||
+ | hlp = x; | ||
+ | } else { | ||
+ | hlp = 0; | ||
+ | } | ||
+ | |||
+ | int a = hlp + x; | ||
+ | |||
+ | // ή απλούστερα (και δε χρειάζεται και η βοηθητική μεταβλητή) | ||
+ | int b = (x> | ||
+ | }</ |