Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added fizzbuzz.c, README.md updated, object files include in .gitigno…
…re (#4) * Added fizzbuzz.c, README.md updated, object files include in .gitignore * Update README.md
- Loading branch information
1 parent
30d111c
commit 8a6df9e
Showing
3 changed files
with
79 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
node_modules/ | ||
playground/ | ||
youtube/ | ||
Instagram/ | ||
Instagram/ | ||
a.out | ||
.vscode/ | ||
*.o |
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,34 @@ | ||
/** | ||
* @author: Rajdeep Roy Chowdhury<rrajdeeproychowdhury@gmail.com> | ||
* @github: https://github.com/razdeep | ||
* @date: 20/12/2018 | ||
**/ | ||
|
||
#include <stdio.h> | ||
|
||
int main() | ||
{ | ||
int n; | ||
printf("Enter a number upto which you want to find Fizzbuzz numbers "); | ||
scanf("%d", &n); | ||
for (int i = 1; i <= n; i++) | ||
{ | ||
if (i % 5 == 0 && i % 3 == 0) | ||
{ | ||
printf("FizzBuzz\n"); | ||
} | ||
else if (i % 5 == 0) | ||
{ | ||
printf("Buzz\n"); | ||
} | ||
else if (i % 3 == 0) | ||
{ | ||
printf("Fizz\n"); | ||
} | ||
else | ||
{ | ||
printf("%d\n", i); | ||
} | ||
} | ||
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