c# What is wrong here??? | Sololearn: Learn to code for FREE!

0

c# What is wrong here???

https://code.sololearn.com/cIP0XTZVbmZr/?ref=app

c++

12/8/2021 12:42:49 AM

Bob Bob

13 Answers

New Answer

+3

You are passing a lesson on converting a string variable to a finishing variable and you were given an example. Let's say you need to do some kind of mathematical calculation with the "x" variable.

+1

Output: Console.WriteLine(n);

0

You should print the output, add this line: Console.WritleLine(n);

0

Okay, thanks that helped I have another question though:

0

Whats the point of doing all of that when I can just do: string n = “77”; Console.WriteLine (n);

0

Hmm, I'm not exactly sure what you mean, it's not wrong!

0

Like why do I have to say: double n; string x = “77”; n = Console.ToDouble (x) Console.WriteLine (n); When I could just say: string x = “77” Console.WriteLine (x);

0

I know but whats the point of writing 4 lines when i could write 2?

0

It makes no sense

-1

Yes, i just want to know the use of it though

-1

There is nothing

-1

-2

place halp me facebook page