+ 14
Challenge!! Date to day converter!!
Can you create a program that takes a date and outputs it's day? Example- input=01:04:2018 output=sunday. Share your creation.
14 Réponses
+ 2
######################
######## #######
######## ############
######## #######
############# #######
######## #######
######################
Here is my code.. CPP
https://code.sololearn.com/cvJdSZ7i4Usa/?ref=app
+ 18
Using Zeller's formula (for dates after September 14, 1752.):
https://code.sololearn.com/chTE2gk5kbWW/?ref=app
+ 18
Using built-in functions:
https://code.sololearn.com/cyxoefQvZR08/?ref=app
+ 8
My solution. Enter date in the form: dd:mm:yyyy e.g: 1:4:2018
https://code.sololearn.com/caB1STt3SWuu/?ref=app
+ 6
Check out my solution in cpp.
It's very simple and easy to understand.
I have used only if else and while loop to create it.
It also works for a negative year that is an year in BC.
My strategy was to save a date in the program and then count the number of days between the input date and fix date and then after dividing the no.of days with 7, the remainder will tell us the day of the date.☺️
https://code.sololearn.com/cLBWCIF8Ld86/?ref=app
+ 5
There it is, in Ruby. I used dd/mm/yyyy as date format.
https://code.sololearn.com/cvu7W8A43yo9/?ref=app
+ 5
You can submit this type of contents under lesson factory's assignment section.
+ 4
My try. Kindly enter the date in the form of DD/MM/YYYY only.
https://code.sololearn.com/cXrNu1Rs3kT3/?ref=app
+ 4
my new version
https://code.sololearn.com/cc39i301kDOx/?ref=app
+ 3
My solution in python.
https://code.sololearn.com/cdy8hp5L1562/?ref=app
+ 3
heeeelp please
https://code.sololearn.com/cS5wc5jJbKk3/?ref=app
+ 1
My try in Javascript.
Please, someone could help me improve this code?
insert the date on the format DD/MM/YYYY
https://code.sololearn.com/WdKo1HfBAwkE
0
Enter the date in yyyy-mm-dd format:
https://code.sololearn.com/cdy8hp5L1562
0
.v