Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Repeat/C/repeat.c
Normal file
15
Task/Repeat/C/repeat.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <stdio.h>
|
||||
|
||||
void repeat(void (*f)(void), unsigned int n) {
|
||||
while (n-->0)
|
||||
(*f)(); //or just f()
|
||||
}
|
||||
|
||||
void example() {
|
||||
printf("Example\n");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
repeat(example, 4);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue