cl-compiler / samples /conditionals.cl
GitHub Actions
Sync from GitHub: fe8c57c
e3486fe
Raw
History Blame Contribute Delete
252 Bytes
// conditionals.cl — Tests if/then/else control flow
int score;
string grade;
score = 85;
if score > 90 then {
grade = "A";
} else {
grade = "B";
}
// Nested condition
int bonus;
bonus = 0;
if score > 80 then {
bonus = bonus + 10;
}