+ 15
[ ASSIGNMENT ] Swap Case ( Any language )
Make a program that takes a String from the user and swaps the case of each character ( that is from Lower case to Upper and vice-versa ). Example >>> 1.Input : SOLOlearn 1.Ouput : soloLEARN 2. Input : aArOn sToNe 2. Output : AaRoN StOnE Any language is welcome. Try your best. Thank you !! Aaron Stone. Here's my try in Java ! https://code.sololearn.com/cxi5Igd2PigC/?ref=app
37 odpowiedzi
+ 12
https://code.sololearn.com/cXOIP88tv3ld/?ref=app
+ 22
https://code.sololearn.com/c86b1b2Xx9V1/?ref=app
+ 15
Ruby oneliner and Kotlin 2 lines
https://code.sololearn.com/cDpgbP50jgHA/?ref=app
https://code.sololearn.com/cNSRGEpP2sBM/?ref=app
+ 12
https://code.sololearn.com/c3QwIF0HJSH3/?ref=app
+ 8
https://code.sololearn.com/cklXyIsO9l7Z/?ref=app
+ 7
Here is an iterative approach in ruby.
https://code.sololearn.com/c875ixeIue0h
and Python
https://code.sololearn.com/c9x7KmuOUPV2
+ 7
https://code.sololearn.com/cUyvJldbJl5m/?ref=app
+ 7
My try in Java...
https://code.sololearn.com/csMVqFBZ2M9m/?ref=app
+ 5
https://code.sololearn.com/cQHR44zK1n5L/?ref=app
+ 5
Simon Nikiforov It's a swap case not reciprocal letter ._.
+ 4
In ruby
puts gets.chomp.swapcase
https://code.sololearn.com/cJ44HNSQ6ZyT
+ 4
nice but seriously,how many can do this without using the cheap "swapcase" method?
+ 4
https://code.sololearn.com/cC6lCIOrN53i/?ref=app
someone did this challenge before, so here's my code for that
+ 4
One liner in python.
https://code.sololearn.com/cGqXHGBoyef8
+ 4
https://code.sololearn.com/cC4WXdrGz5vr/?ref=app
+ 3
Didn't know it was this simple in Python ! @Jan Markus