j_U1p4.java

import java.util.Scanner; public class prog4{ public static void main(String []args) { double a,b; Scanner sc=new Scanner(System.in); System.out.println("enter a "); a=sc.nextDouble(); System.out.println("enter b "); b=sc.nextDouble(); System.out.println("add is "+(a+b)); System.out.println("sub is "+(a-b)); System.out.println("mul is "+(a*b)); System.out.println("div is "+(a/b)); System.out.println("mod is "+(a%b)); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.