Computer Science, asked by ashwin41566, 7 months ago

Write a java program for division of two number. pls iam solving my big brothers online exam paper i need help he is injured and he is in icu

Answers

Answered by anindyaadhikari13
2

Question:-

Write a program in Java to perform division of two numbers.

Program:-

import java.util.*;

class Division

{

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

System.out.print("Enter the first number: ");

double a=sc.nextDouble();

System.out.print("Enter the second number: ");

double b=sc.nextDouble();

System.out.println("Result is: "+a/b);

}

}

Answered by kritikagarg2707
2

View the above images .

Hope it helps

Please make it the brainliest answer

Note : The above code is being written using Scanner class

Attachments:
Similar questions