Google Answers Logo
View Question
 
Q: Microsoft c++ .net ( No Answer,   2 Comments )
Question  
Subject: Microsoft c++ .net
Category: Computers
Asked by: cringe-ga
List Price: $5.00
Posted: 08 Sep 2002 18:30 PDT
Expires: 15 Sep 2002 14:20 PDT
Question ID: 62918
write a visual c++ code that will allow the user to input the vales of
lenght, width adn depth of a pool and display an answer. This must be
in a very simple format that prints to the screen such as in a win32
cpp file that is run from the console

Request for Question Clarification by secret901-ga on 08 Sep 2002 18:56 PDT
Does this program calculate the volume of the pool?

Clarification of Question by cringe-ga on 08 Sep 2002 19:39 PDT
yes this does need the volume of a pool. it assumes the pool is equal
in size on all ends

Request for Question Clarification by joseleon-ga on 08 Sep 2002 23:19 PDT
Hello:
  Do you want a form to enter the three values in three edit boxes, a
button to perform the operation and a label to show the results?

Regards.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Microsoft c++ .net
From: nathanysmith-ga on 10 Sep 2002 16:00 PDT
 
well, if you want it to run straight from console: obviously, you need
to switch data types if you want something other than ints


[STAThread]
public static void Main(string[] args)
{

   int x,y,z;

   try
{

   x=Convert.ToInt32(args[0]);
   y=Convert.ToInt32(args[1]);
   z=Convert.ToInt32(args[2]);

   Console.WriteLine("Volume Is: " + CalcVol(x,y,z).ToString());
}
catch(Exception e)
{
   Console.WriteLine("USAGE: VolCalc IntegerDimX IntegerDimY
IntegerDimZ");
}

}
public static int CalcVol(int x,int y,int z)
{
  return (x*y*z);
}
Subject: Re: Microsoft c++ .net
From: nathanysmith-ga on 10 Sep 2002 16:01 PDT
 
actually, it's c# but if they're running .NET , you may as well use it anyway

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy