In this exercise, we will create a C# program that determines whether a given number is positive, negative, or zero. The program will prompt the user to input a number, evaluate it...
In this exercise, we will create a C# program that interacts with the user to perform conditional addition. The program will first prompt the user for a number. If the number is no...
In this exercise, we will create a C# program that performs division safely by handling the case where the divisor is zero. The program will first prompt the user for two numbers. ...
This exercise focuses on implementing conditional logic in C# using the else statement. We will create a program that asks the user for two numbers. If the second number (the divis...
This exercise demonstrates how to use conditional statements in C# to compare three numbers and find the greatest one. The program will prompt the user to input three different num...
This exercise demonstrates how to use a while loop in C# to repeatedly ask for user input and perform a calculation. The program prompts the user to enter a number "x" and calculat...
This exercise demonstrates how to use a do-while loop in C# to repeat a process at least once and continue until a certain condition is met. The program prompts the user to enter a...
This exercise focuses on using a while loop in C# to iterate through a set of numbers and display them on the screen. In this case, we will display the numbers from 1 to 10. The wh...
This exercise focuses on using a while loop in C# to generate and display the multiplication table of a given number. A while loop repeatedly executes a block of code as long as a ...
This exercise demonstrates how to use a while loop in C# to display odd numbers in descending order. In this case, the program will start at 15 and display every odd number down to...
This exercise teaches you how to use a loop to ask the user for an undetermined number of inputs and calculate their sum. The program will continue to ask the user for numbers unti...
This exercise helps you practice the use of conditionals in C# to determine whether two input numbers are negative or not. The program asks the user to input two numbers and checks...
In this exercise, you will create a C# program that prompts the user to enter two numbers and checks the conditions for negativity. The program will determine whether both numbers ...
In this exercise, you'll create a C# program that displays all numbers between 1 and 500 that are divisible by both 3 and 5. This task helps practice the use of loops and the modul...
In this exercise, you will write a C# program that asks the user for two inputs: a number and a quantity. The program will then repeat the number as many times as specified by the ...
In this task, you'll create a simple login verification program using C#. The program will continuously ask the user to enter their login and password until the correct values are ...
In this task, you will create a login verification program in C# that asks the user for their login and password. The program will repeat the prompt until the correct login and pas...
This C# program is designed to ask the user for two numbers. It then performs the division of the first number by the second and displays both the result of the division and the re...
This C# program generates and displays the multiplication tables for numbers from 2 to 6. It uses nested "do...while" loops to iterate through both the numbers 2 to 6 and the multi...
In this C# program, the user is prompted to input two pieces of data: a number and a width. The number is used as the inner symbol to create a square pattern, where the width of th...
In this C# program, we will display the even numbers between 10 and 20, inclusive, but excluding the number 16. The program will demonstrate how to do this in three different ways ...
This C# program is designed to prompt the user for a number, the width, and the height of a rectangle. The user will input a number that will be used as the symbol to form the rect...
This C# program demonstrates the use of three different types of loops to accomplish the same task. The user is prompted to enter two numbers, and the program will display the numb...
In this C# program, the user will be prompted to enter an integer. The program will calculate and display the number of digits in that integer. The key approach here is repeatedly ...
In this C# program, the user will be asked to input a symbol and a width. The program will then use that symbol to create a hollow square with the given width. The outer border of ...
In this C# program, the user is asked to input two integer numbers. The program will then calculate their multiplication by using consecutive additions, rather than the traditional...
In this C# program, we aim to calculate the absolute value of a number x. The absolute value of a number is always non-negative. If the number is positive or zero, the absolute val...
In this C# program, the user is prompted to enter a symbol, a width, and a height. The program then generates and displays a hollow rectangle using that symbol for the outer border...
This C# program allows the user to input numbers continuously and calculates various basic statistical operations for the entered numbers: the sum, average, minimum, and maximum va...
This C# program allows the user to input a numerical grade and then displays the corresponding text grade based on a predefined scale. The program implements two methods for determ...
This C# exercise aims to develop a program that asks the user for two numbers and uses the conditional operator (?) to answer the following questions: ...
This C# program prompts the user to input an integer and then determines whether the given number is a prime number or not. A prime number is defined as a number greater than 1 tha...
This C# program is designed to calculate the change that a customer should receive after making a purchase. It assumes that the store has an unlimited amount of coins and bills, in...
This C# program prompts the user to input two numbers and performs a division operation. The program handles potential errors, such as division by zero, using a try..catch block to...