Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int forfunction (int count)
- {
- if (count == 0)
- return 0;
- else
- printf("Hello\n");
- forfunction(--count);
- }
- int main(void)
- {
- printf("for loop:\n\n");
- int i;
- for (i=0;i<10;i++) {
- printf("Hello\n");
- }
- printf("\nfor function:\n\n");
- forfunction(10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement