Search This Blog

If you have any problem or question please write in the comments. We will try to solve and send you the solution. Not just that we will also post your problems solution on our blog.

Friday, 8 April 2011

A simple Java program which tells the weather

import java.util.*;
class weather
public static void main (String arg[])
Scanner in=new Scanner (;
int a;
System.out.print ("\n\t Enter the temprature in Celcious = ");
if (a<=20)
System.out.print ("\n\t Whether is Cool ");
else if (a<=30 && a>=21)
System.out.println ("\n\t Whether is Fine ");
else if (a<=40 && a>=31)
System.out.println ("\n\t Whether is Hot ");
System.out.println ("\n\t Whether is very Hot ");

No comments:

Post a Comment