Menu
Question Index
...

Write a program to print truth table for the given degree.

Input (int) Printed Output
2 TT
TF
FT
FF
3 TTT
TTF
TFT
TFF
FTT
FTF
FFT
FFF
4 TTTT
TTTF
TTFT
TTFF
TFTT
TFTF
TFFT
TFFF
FTTT
FTTF
FTFT
FTFF
FFTT
FFTF
FFFT
FFFF
1 T
F



class PrintTruthTable
{
    public static void main(String s[])
    {
        int degree = 3;
        printTruthTable(degree);

    }


    public static void printTruthTable(int degree) {
    }

}

Doubts

Problems

Topic: Java Operator Precedence And Associativity

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App