473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

using Math.sqrt

Hi. I'm trying to construct a simple console application in c#. I basically
want to print out the sqrt of 9, here's the line:

Console.WriteLine(Math.Sqrt(9));

But an error is saying that an assembly is missing. The namespace system is
already imported, anyone know how to get this working?

I'm using vs.net 2003.

Rats
Nov 17 '05 #1
3 7073
I can't reproduce the problem.
I created a new ConsoleApplication from the same application (vs2003) and
pasted the line in.
No problem, it ran fine.

Could you provide a complete, yet simplified example that shows the code
being run with the error?
If you could provide the name of the assembly that it thinks is missing.
that will also help.

Jax

"rattansingh" <ra*********@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
Hi. I'm trying to construct a simple console application in c#. I basically want to print out the sqrt of 9, here's the line:

Console.WriteLine(Math.Sqrt(9));

But an error is saying that an assembly is missing. The namespace system is already imported, anyone know how to get this working?

I'm using vs.net 2003.

Rats

Nov 17 '05 #2
did you reference System.dll?

"rattansingh" <ra*********@discussions.microsoft.com> schrieb im Newsbeitrag
news:06**********************************@microsof t.com...
Hi. I'm trying to construct a simple console application in c#. I
basically
want to print out the sqrt of 9, here's the line:

Console.WriteLine(Math.Sqrt(9));

But an error is saying that an assembly is missing. The namespace system
is
already imported, anyone know how to get this working?

I'm using vs.net 2003.

Rats

Nov 17 '05 #3
Ron
If you are using VS, the System.dll is already referenced, so chances are you
are missing another assembly in your project. It wouldn't hurt to verify that
you still have the System.dll though.

"rattansingh" wrote:
Hi. I'm trying to construct a simple console application in c#. I basically
want to print out the sqrt of 9, here's the line:

Console.WriteLine(Math.Sqrt(9));

But an error is saying that an assembly is missing. The namespace system is
already imported, anyone know how to get this working?

I'm using vs.net 2003.

Rats

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Oliver Plohmann | last post by:
Hello! In JDK1.5 Sun has introduced autoboxing. The user does not need to convert an instance of Integer into an int herself anymore when she wants to do arithmetic operations with the int. The...
89
by: Radioactive Man | last post by:
In python 2.3 (IDLE 1.0.3) running under windows 95, I get the following types of errors whenever I do simple arithmetic: 1st example: >>> 12.10 + 8.30 20.399999999999999 >>> 1.1 - 0.2...
17
by: cwdjrxyz | last post by:
Javascript has a very small math function list. However there is no reason that this list can not be extended greatly. Speed is not an issue, unless you nest complicated calculations several levels...
7
by: herrcho | last post by:
i am learning C with 'a book on c' by kelley/pohl and got stuck in chapter 3 .. here is the code. #include <math.h> #include <stdio.h> main() { double x; while(1)
33
by: Darius Fatakia | last post by:
Hi, I seem to be having trouble with some of my math functions (pow, sqrt, acos). They're the only ones I use in my code and they prevent the program from compiling. I get a "undefined reference...
3
by: LeTubs | last post by:
Hi I'm having a bit of problem trying to compile a program..... which uses math.h #include <stdio.h> #include <stdlib.h> #include <math.h> double sxy, sxx, syyy;
1
by: Reiner Apke | last post by:
Hello, I have got a very strange problem with the calcualtion of the the square root (Math.Sqrt()). I calculate in a loop a lot of of diameters maxDiameter = Math.Sqrt(maxCrossSection *...
4
by: pdlemper | last post by:
Have carefully installed Python 2.5.1 under XP in dir E:\python25 . ran set path = %path% ; E:\python25 Python interactive mode works fine for simple arithmetic . Then tried >> import math Get...
13
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, Why does Math.Sqrt() only accept a double as a parameter? I would think it would be just as happy with a decimal (or int, or float, or ....). I can easily convert back and forth, but I am...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.