Computer Science, asked by pushpendrakumar2, 1 year ago

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
Vaibhava33: different formulas for each
1Rubin1: i started just now
Vaibhava33: just take values and put it!
Vaibhava33: wow rubin its amazing
pushpendrakumar2: hey don't tease
1Rubin1: area and volume of what?
pushpendrakumar2: of square
1Rubin1: and volume
pushpendrakumar2: of cube

Answers

Answered by Vaibhava33
9
mark my answer as brainliest if u think that i answered correctly
Attachments:

pushpendrakumar2: really
Vaibhava33: yupp
pushpendrakumar2: i m not telling lie
pushpendrakumar2: okby
pushpendrakumar2: yes i have now marked u as brainest
Vaibhava33: thanx
Vaibhava33: bye
pushpendrakumar2: ok by
pushpendrakumar2: have a coooooooool night
Vaibhava33: thanx
Answered by 1Rubin1
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));
        }
    }
    
}



1Rubin1: in to celcius print statement it will be m
Vaibhava33: yupp
1Rubin1: it is tested and right
pushpendrakumar2: ok thanks friend
1Rubin1: good luck
pushpendrakumar2: ok by
pushpendrakumar2: have a coooool night
pushpendrakumar2: good night
RahulRanjansahoo: you are really brainly
Similar questions