TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Calculate Centigrade To Fahrenheit Using Java
Senthilvelan Sambamoorthy
Aug 13
2016
Code
1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
ssvcf.rar
// centigrade to fahrenhit
import
java.io.*;
class
ssvcf
{
public
static
void
main(String arg[])
throws
IOException
{
String s1,s2;
double
t1,t2;
DataInputStream dr =
new
DataInputStream(System.in);
System.out.println(
"\nEnter the temperature in centigrade : "
);
s1 = dr.readLine();
t1 = Double.parseDouble(s1);
t2 = (
1.8
* t1 +
32
);
System.out.println(
"\nThe temperature in farenhit is : "
+t2);
}
}
Java