Python language format function in C#

Asked

Viewed 75 times

1

int varvalor;
int var01 = varvalor * 1;
Console.Write("Digite um número para ser multiplicado: ");
var01 = Convert.ToInt32 (Console.ReadLine());
Console.WriteLine();

I wanted to write on Console.WriteLine(); these lines of code written in Python.

varvalor = int(input("Digite um número para ser multiplicado: "))
var01 = varvalor * 1
print("{} x 1 = {}".format(varvalor, var01))

Is there any way to do this in C#?

1 answer

1


Browser other questions tagged

You are not signed in. Login or sign up in order to post.