Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions program.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
define factorial(int n){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add doc for factorial method.

int fact = 1;
for(i = 1; i <= n; i++){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space before "{" brace

fact = fact * i;
}
printf("%d",fact);
}


define EvenOdd(int num){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name in camel case. Also Please add doc for this method.

if(num % 2 == 0)
printf("number is even");
else
printf("number is odd");
}