Celsius to Fahrenheit conversion and vise versa

48 views
Skip to first unread message

Neha-Sarika K

unread,
Apr 26, 2007, 2:23:51 PM4/26/07
to DotNetDe...@googlegroups.com

Hi I am new to .net and want to write a code to convert Celsius to Fahrenheit conversion and vise versa

On form I have two text box and one calculate button

Conditions are:

When user enter temp in F in one textbox and click button then temp in C should appear in second text box and vise versa

Should check whether the box is not null
formulas:

f = (9 / 5) * c + 32

c = (5 / 9) * (f - 32)

Can anybody write me the code, please help me.

Thank you

Smith, Peter

unread,
Apr 26, 2007, 3:09:20 PM4/26/07
to DotNetDe...@googlegroups.com

Sounds like homework to me. J

 

_____
Peter Smith


Peter Bradley

unread,
Apr 26, 2007, 3:43:18 PM4/26/07
to DotNetDe...@googlegroups.com
Ysgrifennodd Smith, Peter:
>
> *Sounds like homework to me. **J***
>
> * *
>
> _____
> /Peter Smith/
>

And to me. You gotta give these guys full marks for cheek. Too idle even
to google! Putting:

"celsius to fahrenheit converter c#"

into Google, comes back with 15,600 results, the first of which is:

_*Celsius to Fahrenheit converter* - MSDN Forums
<http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1490298&SiteID=1>_
*Celsius to Fahrenheit converter* Answered Question This post has a code
sample within *...* Visual Studio C++ Express Orcas, -» Visual Studio
*C#* Express Orcas *...

*The fourth one is:

*Convert Fahrenheit* and *Celsius* at *C#* Online.NET
(CSharp-Online.NET)
<http://en.csharp-online.net/Convert_Fahrenheit_and_Celsius>
*Convert Fahrenheit* and *Celsius* *...* This *C#* code snippet converts
temperatures between the two major temperature scales—*Fahrenheit* and
*Celsius*. *...*

How hard is that? Even if you haven't read: "The C Programming Language"
and can't translate from C to C#.

I hope he either pulls his socks up and does some work, or fails.


Peter

Jamie Fraser

unread,
Apr 27, 2007, 4:37:54 AM4/27/07
to DotNetDe...@googlegroups.com
Write your own code! Some people eh!

Smith, Peter

unread,
Apr 27, 2007, 8:52:18 AM4/27/07
to DotNetDe...@googlegroups.com
Jamie Fraser extorts:

> Write your own code! Some people eh!

I seem to remember this being an example of a web service, somewhere.

If I had a public server to toss it onto, I'd do that, and give him code
to call the service for the conversion. :)

Biju Varghese

unread,
Apr 27, 2007, 4:51:31 AM4/27/07
to DotNetDe...@googlegroups.com
help out ur self
 
if u need logic i can give u
 
bye
biju
 

Cerebrus

unread,
Apr 27, 2007, 10:51:00 AM4/27/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
ROFLMAO !!!

Anand Purushothaman

unread,
May 4, 2007, 4:33:47 AM5/4/07
to DotNetDe...@googlegroups.com
 


place 2 text boxes named TxtFaren and TxtCent
 
Write following codes in command button
if val(txtfaren) =0 and val(txtcent) <> 0 then txtfaren.text = (9 / 5) * val(txtcent.text) + 32
if val(txtfaren) <>0 and val(txtcent) = 0 then txtcent.text = (5 / 9) * (val(txtfaren.txt) - 32)
 
On 4/26/07, Neha-Sarika K <nak...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages