Answer to Question #282066 in Java | JSP | JSF for Lovely

Question #282066

Write a program to calculate the voltage when the value of electric current and resistance

1
Expert's answer
2021-12-22T14:18:25-0500


import java.util.Scanner;


public class App {


	/**
	 * The start point of the program
	 * 
	 * @param args
	 * 
	 */
	public static void main(String[] args) {
		Scanner keyBoard = new Scanner(System.in);
		System.out.print("Enter the electric current (I): ");
		double I = keyBoard.nextDouble();
		System.out.print("Enter the electric resistance (R): ");
		double R = keyBoard.nextDouble();
		double U = I * R;
		System.out.print("Enter the electric voltage (U): " + U);


		keyBoard.close();
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog