Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added implementation of fizzbuzz in go (#14)
* Add @Ramanpreet6262 as a contributor * added fizzbuzz implementation in go * Update CONTRIBUTORS.md
- Loading branch information
1 parent
a0207ab
commit 2d37670
Showing
5 changed files
with
233 additions
and
148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
|
||
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors) | ||
## Contributors | ||
|
||
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
<!-- prettier-ignore --> | ||
| [<img src="https://avatars2.githubusercontent.com/u/26179770?v=4" width="100px;"/><br /><sub><b>MADHAV BAHL</b></sub>](http://madhavbahl.tech/)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=MadhavBahlMD "Code") [📝](#blog-MadhavBahlMD "Blogposts") [📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=MadhavBahlMD "Documentation") [🎨](#design-MadhavBahlMD "Design") [✅](#tutorial-MadhavBahlMD "Tutorials") | [<img src="https://avatars2.githubusercontent.com/u/32531173?v=4" width="100px;"/><br /><sub><b>Rajdeep Roy Chowdhury</b></sub>](http://www.linkedin.com/in/razdeeproychowdhury)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Razdeep "Code") [📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Razdeep "Documentation") [✅](#tutorial-Razdeep "Tutorials") | [<img src="https://avatars1.githubusercontent.com/u/16208722?v=4" width="100px;"/><br /><sub><b>Hrishi</b></sub>](https://hrishi1999.github.io)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Hrishi1999 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Hrishi1999 "Code") | [<img src="https://avatars1.githubusercontent.com/u/33101287?v=4" width="100px;"/><br /><sub><b>Bhanu Ailani</b></sub>](https://github.com/Bhanu0202)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Bhanu0202 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Bhanu0202 "Code") | [<img src="https://avatars3.githubusercontent.com/u/35690440?v=4" width="100px;"/><br /><sub><b>Deepak Sharma</b></sub>](https://sourcerer.io/dsdsharma)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dsdsharma "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dsdsharma "Code") | [<img src="https://avatars1.githubusercontent.com/u/27620628?v=4" width="100px;"/><br /><sub><b>Anil Khatri</b></sub>](https://imkaka.github.io/)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=imkaka "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=imkaka "Code") | | ||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||
|
||
| [<img src="https://avatars2.githubusercontent.com/u/26179770?v=4" width="100px;"/><br /><sub><b>MADHAV BAHL</b></sub>](http://madhavbahl.tech/)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=MadhavBahlMD "Code") [📝](#blog-MadhavBahlMD "Blogposts") [📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=MadhavBahlMD "Documentation") [🎨](#design-MadhavBahlMD "Design") [✅](#tutorial-MadhavBahlMD "Tutorials") | [<img src="https://avatars2.githubusercontent.com/u/32531173?v=4" width="100px;"/><br /><sub><b>Rajdeep Roy Chowdhury</b></sub>](http://www.linkedin.com/in/razdeeproychowdhury)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Razdeep "Code") [📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Razdeep "Documentation") [✅](#tutorial-Razdeep "Tutorials") | [<img src="https://avatars1.githubusercontent.com/u/16208722?v=4" width="100px;"/><br /><sub><b>Hrishi</b></sub>](https://hrishi1999.github.io)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Hrishi1999 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Hrishi1999 "Code") | [<img src="https://avatars1.githubusercontent.com/u/33101287?v=4" width="100px;"/><br /><sub><b>Bhanu Ailani</b></sub>](https://github.com/Bhanu0202)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Bhanu0202 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Bhanu0202 "Code") | [<img src="https://avatars3.githubusercontent.com/u/35690440?v=4" width="100px;"/><br /><sub><b>Deepak Sharma</b></sub>](https://sourcerer.io/dsdsharma)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dsdsharma "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dsdsharma "Code") | [<img src="https://avatars1.githubusercontent.com/u/27620628?v=4" width="100px;"/><br /><sub><b>Anil Khatri</b></sub>](https://imkaka.github.io/)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=imkaka "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=imkaka "Code") | [<img src="https://avatars2.githubusercontent.com/u/28749866?v=4" width="100px;"/><br /><sub><b>Ramanpreet Singh</b></sub>](https://github.com/Ramanpreet6262)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Ramanpreet6262 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Ramanpreet6262 "Code") | | ||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
|
||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! | ||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! |
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,33 @@ | ||
/* | ||
* @author: Ramanpreet Singh <ramanpreet6262@gmail.com> | ||
* @github: https://github.com/Ramanpreet6262 | ||
* @date: 20/12/2018 | ||
*/ | ||
|
||
|
||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("Enter a number upto which you want to find Fizzbuzz numbers: ") | ||
var n int | ||
_, err := fmt.Scanf("%d", &n) | ||
|
||
if err != nil { | ||
fmt.Println(err) | ||
} | ||
|
||
|
||
for i := 1; i <= n; i++ { | ||
if i % 3 == 0 && i % 5 == 0 { | ||
fmt.Println("FizzBuzz") | ||
} else if i % 5 == 0 { | ||
fmt.Println("Buzz") | ||
} else if i % 3 == 0 { | ||
fmt.Println("Fizz") | ||
} else { | ||
fmt.Println(i) | ||
} | ||
} | ||
} |
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
Oops, something went wrong.