Console.WriteLine("Please enter a number");
int num = int.Parse(Console.ReadLine());
int num1 = int.Parse(Math.Floor(num));
int num3 = int.Parse(num - num1);
Console.Write("shekel: ");
Console.WriteLine(num1);
Console.Write("agorot: ");
Console.WriteLine(num3);
I'm getting an error in line 3:
Severity Code Description Project File Line Error CS0121 The call is ambiguous between the following methods or properties: 'Math.Floor(decimal)' and 'Math.Floor(double)
And in line 4:
And Severity Code Description Project File Line Error CS1503 Argument 1: cannot convert from 'int' to 'string'
I'm supposed to make a program that recieves a number (such as 10.22) and in one message and then in another message say what's the decimal number and what's the number after the dot.
What am I doing wrong?