Skip to content

Commit 5a9607d

Browse files
committed
Fix Syntax error in nCr.cpp
1 parent f84f0ff commit 5a9607d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Math/Combinations/nCr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ int nCr(int n, int r) {
1717
int main(int argc, char** argv){
1818

1919
if(argc != 3){
20-
cerr<<"Usage: nCr n r\nWhere n is the number of all items and r is the number of chosen sets."
20+
cerr<<"Usage: nCr n r\nWhere n is the number of all items and r is the number of chosen sets.";
21+
return 1;
2122
}
2223
int n = atoi(argv[1]), r = atoi(argv[2]);
2324
printf("%d choose %d = %d\n", n, r, nCr(n,r));

0 commit comments

Comments
 (0)