Computer Science, asked by ansudennyc, 4 days ago

Construct a logic circuit for boolean expression (a.b)¹ + c.​

Answers

Answered by Shivu516
2

This logic is in Java

I have assumed that (a.b) means a × b

import java.util.Scanner;

public class Main{

   public static void main(String [] args){

       Scanner sc = new Scanner(System.in);

       double a, b, c, expression = 0;

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

       a = sc.nextDouble();

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

       b = sc.nextDouble();

       System.out.print("Enter the third value: ");

       c = sc.nextDouble();

       expression = (a*b) + c;

       System.out.println("Expression: " + expression);

   }

}

Output:

Enter the first value: 10

Enter the second value: 20

Enter the third value: 30

Expression: 230.0

Similar questions