write a programme in java to calculate area/ volume/ conversion of temperature/ swapping of values /those who will make all of my question ../I will mark him/ her as brainest
1Rubin1:
so
Answers
Answered by
9
mark my answer as brainliest if u think that i answered correctly
Attachments:
Answered by
8
import java.util.*;
public class brainly
{
static Scanner s = new Scanner(System.in);
static void swap()
{
System.out.print("Enter two digits: ");
int a = s.nextInt();
int b = s.nextInt();
System.out.println("A= "+a);
System.out.println("B= "+b);
int d = b;
b =a;
a=d;
System.out.println("A= "+a);
System.out.println("B= "+b);
}
static void area()
{
System.out.print("Enter side: ");
double a = s.nextDouble();
System.out.println("Area of square: "+(a*a));
}
static void volume()
{
System.out.print("Enter side: ");
double a = s.nextDouble();
System.out.println("Volume of cube: "+(a*a*a));
}
static void convertTemp1()
{
System.out.print("Enter temperature and to change to C or F");
double t = s.nextDouble();
String l= s.next();
char p = l.charAt(0);
if(p=='F')
{
double m = (((9*t)/5)+32);
System.out.println("To Fahrenheit: "+(m));
}
else
{
double m = (((t-32)*5)/9);
System.out.println("TO celcius: "+(((t-32)*5)/9));
}
}
}
public class brainly
{
static Scanner s = new Scanner(System.in);
static void swap()
{
System.out.print("Enter two digits: ");
int a = s.nextInt();
int b = s.nextInt();
System.out.println("A= "+a);
System.out.println("B= "+b);
int d = b;
b =a;
a=d;
System.out.println("A= "+a);
System.out.println("B= "+b);
}
static void area()
{
System.out.print("Enter side: ");
double a = s.nextDouble();
System.out.println("Area of square: "+(a*a));
}
static void volume()
{
System.out.print("Enter side: ");
double a = s.nextDouble();
System.out.println("Volume of cube: "+(a*a*a));
}
static void convertTemp1()
{
System.out.print("Enter temperature and to change to C or F");
double t = s.nextDouble();
String l= s.next();
char p = l.charAt(0);
if(p=='F')
{
double m = (((9*t)/5)+32);
System.out.println("To Fahrenheit: "+(m));
}
else
{
double m = (((t-32)*5)/9);
System.out.println("TO celcius: "+(((t-32)*5)/9));
}
}
}
Similar questions