-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for formatting
.cu
CUDA source files (#123)
- Loading branch information
Showing
4 changed files
with
41 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Addition program */ | ||
#include <stdio.h> | ||
|
||
main() | ||
{ | ||
int integer1, integer2,sum; /* declaration before any executable statements*/ | ||
|
||
printf("Enter first integer\n"); /* prompt */ | ||
scanf("%d", &integer1); /* read an integer */ | ||
printf("Enter second integer\n"); /* prompt */ | ||
scanf("%d", &integer2); /* read an integer */ | ||
sum = integer1 + integer2; /* assignment of sum */ | ||
printf("Sum is %d\n", sum); /* print sum */ | ||
|
||
return 0; /* Indicate program ended successfully */ | ||
} |
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,17 @@ | ||
/* Addition program */ | ||
#include <stdio.h> | ||
|
||
main() | ||
{ | ||
int integer1, integer2, | ||
sum; /* declaration before any executable statements*/ | ||
|
||
printf("Enter first integer\n"); /* prompt */ | ||
scanf("%d", &integer1); /* read an integer */ | ||
printf("Enter second integer\n"); /* prompt */ | ||
scanf("%d", &integer2); /* read an integer */ | ||
sum = integer1 + integer2; /* assignment of sum */ | ||
printf("Sum is %d\n", sum); /* print sum */ | ||
|
||
return 0; /* Indicate program ended successfully */ | ||
} |