Created
January 9, 2013 23:02
-
-
Save zamith/4497818 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void print_ages(int age) { | |
int i; | |
int number_of_trips = 0; | |
for (i = 0; i <= age; i++) | |
{ | |
if(i % 8 == 0 && i % 5 != 0) { | |
printf("%i\n", i); | |
number_of_trips++; | |
} | |
} | |
printf("Number of trips: %i\n", number_of_trips); | |
} | |
int main() { | |
char* str = "Hello World"; | |
int age = 85; | |
print_ages(age); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment