Write a method which takes a name as a parameter and prints on the console "Hello, {name}!".
Input | Output |
---|---|
Peter | Hello, Peter! |
Define a method PrintName(string name)
and implement it, after which read a name from the console in the main program and invoke the method by feeding it the name.
Test your solution here: https://judge.softuni.org/Contests/Practice/Index/594#7.