FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
FizzBuzz/src/PowerShell/fizzbuzz.ps1 at master · sharpninja/FizzBuzz · GitHub
sharpninja
FizzBuzz
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
FizzBuzz
/
src
/
PowerShell
/
fizzbuzz.ps1
Copy path
More file actions
More file actions
Latest commit
History
History
History
10 lines (9 loc) · 446 Bytes
Breadcrumbs
FizzBuzz
/
src
/
PowerShell
/
fizzbuzz.ps1
Copy path
File metadata and controls
10 lines (9 loc) · 446 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
#
FizzBuzz Implementation in PowerShell
#
ijsankar - October 21, 2019
#
#
"Write a program that prints the numbers from 1 to 100. But for multiples of three print
#
"Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which
#
are multiples of both three and five print "FizzBuzz"."
for
(
$i
=
1
;
$i
-
ne
101
;
$i
++
){
write-host
$
(
If
(
!
(
$i
%
15
)){
"
FizzBuzz
"
}
ElseIf
(
!
(
$i
%
5
)){
"
Buzz
"
}
ElseIf
(
!
(
$i
%
3
)){
"
Fizz
"
}
Else
{
$i
} )
}
Back
|
FazBrowse Home
|
New Git URL