From 6f2e722987df1e79e73c8e35b45987ba7f51f4fc Mon Sep 17 00:00:00 2001 From: Shashank Date: Thu, 1 Oct 2020 10:58:02 +0530 Subject: [PATCH 1/5] first --- Day1/C/fizzbuzz2.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Day1/C/fizzbuzz2.c diff --git a/Day1/C/fizzbuzz2.c b/Day1/C/fizzbuzz2.c new file mode 100644 index 00000000..10160429 --- /dev/null +++ b/Day1/C/fizzbuzz2.c @@ -0,0 +1,23 @@ +#include + +int main(void) +{ + int i; + for (i=1; i<=100; i++) + { + + if (i%15 == 0) + printf ("FizzBuzz\t"); + + else if ((i%3) == 0) + printf("Fizz\t"); + + else if ((i%5) == 0) + printf("Buzz\t"); + + else + printf("%d\t", i); + } + + return 0; +} \ No newline at end of file From 52b67fa47c34113c84faf2b922446ed4106d639a Mon Sep 17 00:00:00 2001 From: Shashank Date: Thu, 1 Oct 2020 11:00:58 +0530 Subject: [PATCH 2/5] add Fizzbuzz by shashanknenar --- Day1/C/fizzbuzz2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Day1/C/fizzbuzz2.c b/Day1/C/fizzbuzz2.c index 10160429..7aa89de3 100644 --- a/Day1/C/fizzbuzz2.c +++ b/Day1/C/fizzbuzz2.c @@ -1,3 +1,9 @@ +/* + * @author: shashanknenar + * @date: 01/10/2020 +*/ + + #include int main(void) @@ -16,7 +22,7 @@ int main(void) printf("Buzz\t"); else - printf("%d\t", i); + printf("%d\t", i); //print } return 0; From 5c5875abbb3da586a600d647d2848b68b2778e40 Mon Sep 17 00:00:00 2001 From: Shashank N <51528007+shashanknenar@users.noreply.github.com> Date: Thu, 1 Oct 2020 11:08:51 +0530 Subject: [PATCH 3/5] Update README.md --- Day1/README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Day1/README.md b/Day1/README.md index f022d3d8..5c09516e 100644 --- a/Day1/README.md +++ b/Day1/README.md @@ -149,6 +149,34 @@ int main() return 0; } ``` +/* + * @author: shashanknenar + * @date: 01/10/2020 +*/ + +#include + +int main(void) +{ + int i; + for (i=1; i<=100; i++) + { + + if (i%15 == 0) + printf ("FizzBuzz\t"); + + else if ((i%3) == 0) + printf("Fizz\t"); + + else if ((i%5) == 0) + printf("Buzz\t"); + + else + printf("%d\t", i); //print + } + + return 0; +} ## Python(3) Implementation @@ -490,4 +518,4 @@ obj.solveFizzBuzzProblem(17); The beauty of programming lies in the fact that there is never a single solution to any problem. -In case you have an alternative way to solve this problem, do contribute to this repository (https://github.com/CodeToExpress/dailycodebase) :) \ No newline at end of file +In case you have an alternative way to solve this problem, do contribute to this repository (https://github.com/CodeToExpress/dailycodebase) :) From 3c4f37a8d61870b64b3a40922da08e876a9c0cb9 Mon Sep 17 00:00:00 2001 From: Shashank N <51528007+shashanknenar@users.noreply.github.com> Date: Thu, 1 Oct 2020 11:10:20 +0530 Subject: [PATCH 4/5] Update README.md --- Day1/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Day1/README.md b/Day1/README.md index 5c09516e..58bf46c1 100644 --- a/Day1/README.md +++ b/Day1/README.md @@ -149,6 +149,8 @@ int main() return 0; } ``` + +```c /* * @author: shashanknenar * @date: 01/10/2020 @@ -177,6 +179,8 @@ int main(void) return 0; } +``` + ## Python(3) Implementation From 50177816957a77e3a90e446a8dd4cd32c95ea2a0 Mon Sep 17 00:00:00 2001 From: Shashank N <51528007+shashanknenar@users.noreply.github.com> Date: Thu, 1 Oct 2020 11:12:47 +0530 Subject: [PATCH 5/5] Update README.md --- Day1/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Day1/README.md b/Day1/README.md index 58bf46c1..5dbc547a 100644 --- a/Day1/README.md +++ b/Day1/README.md @@ -149,10 +149,12 @@ int main() return 0; } ``` +### [fizzbuzz2.c](./C/fizzbuzz2.c) ```c /* * @author: shashanknenar + * @github: https://github.com/shashanknenar * @date: 01/10/2020 */