Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add @Shashankjain12 as a contributor * contribution commit * Day1 and Day2
- Loading branch information
1 parent
c535fb5
commit 2dbc909
Showing
8 changed files
with
260 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
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,32 @@ | ||
/** | ||
* @author: Shashankjain12 | ||
* @date: 21/12/2018 | ||
**/ | ||
#include<iostream> | ||
using namespace std; | ||
int main() | ||
{ | ||
int i,n; | ||
cout<<"FIZZ BUZZ \n"; | ||
cout<<"Enter the input for the game"; | ||
cin>>n; | ||
for(i=1;i<=n;i++) | ||
{ | ||
if((i%3==0)&&(i%5==0)) | ||
{ | ||
cout<<"fizzbuzz,"; | ||
} | ||
else if((i%5)==0) | ||
{ | ||
cout<<"buzz,"; | ||
} | ||
|
||
else if((i%3)==0) | ||
{ | ||
cout<<"fizz,"; | ||
} | ||
else | ||
cout<<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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
''' | ||
* @author: Shashankjain12 | ||
* @date: 21/12/18 | ||
''' | ||
print("Fizz Buzz") | ||
n=int(input("Enter the number?")); | ||
for i in range(1,n+1): | ||
if((i%3)==0 and (i%5)==0): | ||
print("Fizzbuzz ") | ||
elif((i%3)==0): | ||
print("fizz ") | ||
elif ((i%5)==0): | ||
print("buzz ") | ||
else: | ||
print(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
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,15 @@ | ||
""" | ||
* @author Shashank | ||
* @date 21/12/2018 | ||
""" | ||
|
||
a=input("Enter the input string:") | ||
d=a.replace(" ","") | ||
c=list(d) | ||
c.reverse() | ||
e="".join(c) | ||
if d==e: | ||
print("String is pallindrome") | ||
else: | ||
print("Not a pallindrome") | ||
|
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.