-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from Yiannis128/v0.3.1
V0.3.1
- Loading branch information
Showing
9 changed files
with
169 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <stdio.h> | ||
|
||
int factorial(int n) | ||
{ | ||
if (n <= 0) | ||
{ | ||
return 1; | ||
} | ||
else | ||
{ | ||
int result = 1; | ||
while (n > 0) | ||
{ | ||
result *= n; | ||
n--; | ||
} | ||
return result; | ||
} | ||
} | ||
|
||
int main() | ||
{ | ||
int num = 10; | ||
printf("Factorial of %d is %d\n", num, factorial(num)); | ||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
source_code = """struct linear | ||
{ | ||
int value; | ||
}; | ||
typedef struct linear LinearTypeDef; | ||
typedef struct | ||
{ | ||
int x; | ||
int y; | ||
} Point; | ||
Point a; | ||
Point *b; | ||
int c; | ||
char *d; | ||
typedef enum Types | ||
{ | ||
ONE, | ||
TWO, | ||
THREE | ||
} Typest; | ||
enum Types e = ONE; | ||
Typest f = TWO; | ||
union Combines | ||
{ | ||
int a; | ||
int b; | ||
int c; | ||
}; | ||
typedef union Combines CombinesTypeDef; | ||
enum extra { A, B, C}; | ||
typedef enum extra ExtraEnum;""" | ||
# TODO |