-
-
Notifications
You must be signed in to change notification settings - Fork 87
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 #16 from cimplec/comments
Fix: single and multi line comments
- Loading branch information
Showing
5 changed files
with
63 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#include <stdio.h> | ||
|
||
int sum(int a, int b) { | ||
|
||
return a + b; | ||
} | ||
/* | ||
Code written by:- Siddhartha | ||
Main starts | ||
*/ | ||
|
||
int main() { | ||
int a = 1; | ||
int b = 2; | ||
switch(a + b) { | ||
case 1: | ||
printf("Hello"); | ||
break; | ||
case 2: | ||
printf("World"); | ||
break; | ||
default: | ||
printf("Default"); | ||
break; | ||
} | ||
int hello = sum(1, 2); | ||
printf("The sum = %d", hello); | ||
exit(0); | ||
// testing single line comment | ||
|
||
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 |
---|---|---|
@@ -1,5 +1,18 @@ | ||
fun sum(a, b) { | ||
return a + b | ||
} | ||
|
||
/* | ||
Code written by:- Siddhartha | ||
Main starts | ||
*/ | ||
|
||
MAIN | ||
var a = 1 | ||
var b = 2 | ||
var char = 1 | ||
var hello = sum(1, 2) | ||
print("The sum = {hello}") | ||
exit (0) | ||
|
||
// testing single line comment | ||
|
||
END_MAIN | ||
|