c# int division to double
double num3 = (double)num1/num2;
c# int division to double
double num3 = (double)num1/num2;
divide int in c#
using System;
namespace Divide{
public class Program{
public static int division(int a, int b){
return (a/b);
}
public static void Main(){
int a,b;
int quotient;
Console.Write("Enter first number: ");
a = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter second number: ");
b = Convert.ToInt32(Console.ReadLine());
quotient = division(a,b);
Console.WriteLine("Quotient is: " + quotient);
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us