Exercise
First Contact With C#
Objective
Write a C# program to print Hello on screen and then print your name (in a separate line).
Write Your C# Exercise
C# Exercise Example
using System; // Importing the System namespace to use Console functionalities
// Main class of the program
public class Program
{
// Main method where the program execution begins
static void Main()
{
// Printing "Hello" to the screen
Console.WriteLine("Hello");
// Printing the user's name on a new line
Console.WriteLine("Your Name"); // Replace "Your Name" with your actual name
}
}
Explore our set of C# programming exercises! Specifically designed for beginners, these exercises will help you develop a solid understanding of the basics of C#. From variables and data types to control structures and simple functions, each exercise is crafted to challenge you incrementally as you build confidence in coding in C#.
This exercise is a great way to practice basic arithmetic operations in C#. In this program, you will learn how to perform an addition operation between two numbers, 12 and ...
This exercise is a great opportunity to practice the division operation in C#. In this program, you will learn how to divide two numbers, in this case, 24 and 5, and ...
This exercise is perfect for learning how to perform complex arithmetic operations in C#. In this program, you will be asked to solve several mathematical operations using d...
This exercise is perfect for learning how to perform a multiplication in C# with numbers entered by the user. In this program, the user will be asked to input two numbers, a...
This exercise is great for learning how to interact with the user in C# and perform basic mathematical operations. In this program, the user will be asked to input three num...
This exercise will help you understand how to perform several basic mathematical operations in C#, such as addition, subtraction, multiplication, division, and calculating t...