Hi!How can I pass C# task? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hi!How can I pass C# task?

I started to do the task (Symbols). I did first test as well , but when I do second test, first goes to ❌ I need to get different answers in one solutions? How I can to do it? Thanks

11th Jul 2020, 4:25 PM
Dr3amer
Dr3amer - avatar
11 Answers
+ 6
// replace string s1="H$i ##########Jenn$$ifer@@@ 42"; with string s1 = Console.ReadLine(); s1.CorrectAString (s1); //Just get the input, and the rest all good
11th Jul 2020, 4:47 PM
᮴Ridwan_
᮴Ridwan_ - avatar
+ 1
Share your attempt here... Someone will guide you to get it right..
11th Jul 2020, 4:27 PM
Jayakrishna 🇮🇳
+ 1
Saltis ON I did it but not in c#. The approach is as yours. Your code works fine but your code shloud work for any input.. You are giving your input manually so it works for that input only. but you shloud take from console. So use input taking method to read string. Hoping you know it... Edit: string s1=Console.ReadLine() ; Everything all works fine. But last writeLine() is no need.
11th Jul 2020, 4:50 PM
Jayakrishna 🇮🇳
0
Jayakrishna🇮🇳 I have seen that you did that task. Can you show me the code, please?
11th Jul 2020, 4:37 PM
Dr3amer
Dr3amer - avatar
0
I think you should share your code here And we will help you to complete your task with you own code by helping you in fixing the bugs in you code . But I will advise you to try it by yourself. And don't copy paste any code that someone would give you here because the main motive of these code coach problems is to make you a better coder. And if you copy paste any other's code then you will never come to know how to fix bugs in a code and how to code in a proper way. So I request you to share your code here so that we can help you. Thank you.
11th Jul 2020, 4:40 PM
Akshay Panwar
Akshay Panwar - avatar
0
Jayakrishna🇮🇳 https://code.sololearn.com/cvUb4mLRcBgp/?ref=app This is my code. Thank you! I just can't understand how to pass all 5 tests at once
11th Jul 2020, 4:46 PM
Dr3amer
Dr3amer - avatar
0
Akshay Panwar Hi! https://code.sololearn.com/cvUb4mLRcBgp/?ref=app This is my code. I think , it haven't mistakes. Commonly,I can't understand how to pass solutions in Solo.
11th Jul 2020, 4:49 PM
Dr3amer
Dr3amer - avatar
0
᮴R1 Thank you very much!
11th Jul 2020, 4:52 PM
Dr3amer
Dr3amer - avatar
0
Jayakrishna🇮🇳 Yes, I know how to do it. Thank you very much for help!
11th Jul 2020, 4:54 PM
Dr3amer
Dr3amer - avatar
0
Saltis ON you're welcome...
11th Jul 2020, 4:55 PM
Jayakrishna 🇮🇳