473,503 Members | 12,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to compare two double datatype values in C#

1 New Member
I am not able to compare two double values in c#

Ex:

double x=36.2444
double Y=35.2244
if(X < Y)
Console.writeline(the value of X:",X);
Jun 23 '15 #1
1 1789
computerfox
276 Contributor
I believe the x is lowercase. Can you try again and let us know?
Also, when you're printing the content, I believe it should be:
Expand|Select|Wrap|Line Numbers
  1. Console.writeline("The value of X: "+x);
  2.  
Jun 24 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
8578
by: akoper | last post by:
I have a table that is a project. Each record is a task in the project. One field in each record is a date/time stamp for when that task was completed. I need to be able to: 1) compute how much...
0
4060
by: dotyet | last post by:
Hey All, I have a small problem. consider the following >db2 "create table ttt (mynum float, yournum double )" DB20000I The SQL command completed successfully. >db2 "describe table ttt" ...
1
4267
by: L Mehl | last post by:
Hello -- Goal is to export data from tblData having this structure: dateRecord Date/Time textFrom Text 4 textTo Text 4 valueRecord Number Double (format = Standard, Dec Pl = 12)...
0
1542
by: Kaja | last post by:
Hi, Compare validator throws error if I have thousand seperator in the double value. ControlToValidate: TextBox1 Operator: DataTypeCheck Type: Double Any help appreciated.
6
1738
by: mdburton | last post by:
$row = mysql_fetch_array(mysql_query("SELECT enemies FROM $tab WHERE id='$cid'")); $array = explode (",", $row); $crewupdate = mysql_query("SELECT id,name,founder FROM $tab WHERE id>0 AND...
26
7097
by: neha_chhatre | last post by:
can anybody tell me how to compare two float values say for example t and check are two variables declared float how to compare t and check please help me as soon as possible
1
2412
by: SEhtesham | last post by:
Hi, My application is in VS2008 coded in vb.net.I have a table with three columns FromDate,Todate and Schedule.FromDate and ToDate will have date values whereas Schedule will have a any of...
5
2730
by: sophannaly | last post by:
Hi, I have one issue that I don't understand. In my table I have fields like total, jan, feb, mar, apr, may,...,dec and all these fields I set its datatype as double and precision as auto. In...
1
1241
by: Praveen07 | last post by:
Hi, I have come across a strange scenario while executing a query. I was surprised by the way Sql Server was executing the query. Quote: SELECT TOP 10 MR.MerchantContactFirstName + ' ' +...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.