Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

C# Sharp Exercises: Print the result of dividing two numbers


C# Sharp Basic: Exercise-3 with Solution

Write a C# Sharp program to print the result of dividing two numbers.

Division is one of the four basic operations of arithmetic, the others being addition, subtraction, and multiplication. The division of two natural numbers is the process of calculating the number of times one number is contained within one another.

C# sharp Exercises: dividing two numbers

Sample Solution:

C# Sharp Code:

public class Exercise3
{
  public static void Main()
  { 
    System.Console.WriteLine(36/6);
  }
}

Sample Output:

6

Flowchart:

Flowchart: C# Sharp Exercises - Print the result of dividing two numbers

C# Sharp Code Editor:

Improve this sample solution and post your code through Disqus

Previous: Write a C# Sharp program to print the sum of two numbers.
Next: Write a C# Sharp program to print the result of the specified operations.

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.