i want your help please please please please please please anwer this
Answers
Answer:
3. import java.util.*;
class wgt
{
public static void main ()
{
Scanner in= new Scanner (System.in);
int w;
System.out.println("Enter a number");
w=in.nextInt();
if(w<55)
{
System.out.println("underweight");
}
else if(w<65)
{
System.out.println("normalweight");
}
else
{
System.out.println("Overweight");
}
}
}
4.import java.util.*;
class AM
{
public static void main ()
{
Scanner in= new Scanner (System.in);
int x,y;
System.out.println("Enter 2 numbers");
x=in.nextint();
y=in.nextInt();
System.out.println("Enter 1 for addition");
System.out.println("Enter 2 for multiplication");
System.out.println("Enter your choice");
ch=in.nextInt();
switch (ch)
{
case 1:
System.out.println(x+y);
break;
case 2:
System.out.println(x*y);
break;
default:
System.out.println(Wrong input);
}
}
}
5.class series
{
public static void main ()
{
Scanner in= new Scanner (System.in);
int i;
for(i=30;i>0;i=i-5)
{
System.out.print(i+", ");
}
}
}
Java ka hai toh hum aise bana diye, pura apne banaye hai.