0
Converting from integer to double
please I'll need a code on converting from integer to double in c#, tried but I was told I can't implicitly do that.
15 Answers
0
I'll try that now and get back to yoy
0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int x = 10;
int y = 4;
System.Convert.Todouble(x/y);
}
}
}
0
that didn't work
0
u can implicitly convert as well:
class x
{
static void Main(string[] args)
{
int x = 2;
int y = 4;
System.Console.WriteLine(((double)x/(double)y));
}
}
bhirkoff
0
Flash I'll try that now
0
Donna still gave me an integer answer
0
Flash it gave me an error
0
bhirkoff just copy and past my code in a blank .cs file
0
alright
0
@perfect thanks
0
Flash that was a mistake.. you should know I marked it as the best answer and should have been a mistake.. why did you have to make me feel bad... I'm a professional internet marketer.. just needed to go into programming
0
bhirkoff i didāt know who it was , donāt feel bad.