Skip to content

Instantly share code, notes, and snippets.

@George-smart
Created October 6, 2022 12:22
Show Gist options
  • Save George-smart/7445e7922ed9c30250006a596ac678de to your computer and use it in GitHub Desktop.
Save George-smart/7445e7922ed9c30250006a596ac678de to your computer and use it in GitHub Desktop.
void main(){
int odd = 1;
// looping through a number ranging from 1 - 30;
for (; odd <= 30; odd++){
// check if it is an odd number
if ((odd % 2) != 0){
// Printing the result.
print("The number is at $odd");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment