0
Hi in my class we learned to write (scanf) and (printf) and here it's not working, to work i should write console.. why?
5 Answers
+ 1
that was C and here C is not available
+ 1
C# equivalent to printf
Console.WriteLine("{0} is {1} years old.", "Tom", 15);
string.Format("I have {0} dogs, {0} cats, and {1} bird", 2, 1);
use the {} placeholders within a string and pass in the comma seperated arguments.
https://msdn.microsoft.com/en-us/library/system.string.format(v=vs.110).aspx
0
but this is also C
0
But this is not c# as your tag say, don't forget to include the library #include <stdio.h>
0
yes buddy, c# totally different programming language. developers replace printf and print by Console.writeLine()