Friday, July 31, 2009

Im a C# student and need some help.?

Hi,





I'm a C# student and am having some trouble understanding a program Im supposed to write. Can you help me out?





Write a program that prompts the user for the length and width of a house. Compute the square feet of the house. Output the result. Use integer variables for the length and width. What data type should be used to store the square feet?





Please give me a head start on this and i'll give you best answer.

Im a C# student and need some help.?
Integer, since an integer * integer can't create a floating point.


I use VB but I assume you would just convert the integer to a string for output.





Sorry if this isn't very helpful!
Reply:heres a little routine to illustrate:





public string squarefeet(int height, int width)


{


int sqft= height* width; // house would have to be billions of square feet to be problem


return sqft.ToString();


}

wedding reception flowers

No comments:

Post a Comment