CodeGym /కోర్సులు /జావా సింటాక్స్ /ప్లానెట్ పాస్కల్ నుండి పరిస్థితులు

ప్లానెట్ పాస్కల్ నుండి పరిస్థితులు

జావా సింటాక్స్
స్థాయి, పాఠం
అందుబాటులో ఉంది

"హాయ్, అమిగో. మన గ్రహం మీద, మేము పాస్కల్‌ని ఉపయోగిస్తాము, ఇది మరింత అధునాతనమైనది. పాస్కల్‌లో ఇది ఇలా ఉంటుంది."

పాస్కల్
If a < b Then
    WriteLn ('a is less than b');
జావా
if (a < b)
    System.out.println("a is less than b");
పాస్కల్
If a < b Then
    WriteLn('a is less than b')
Else
    WriteLn('a is greater than b');
జావా
if (a < b)
    System.out.println("a is less than b");
else
    System.out.println("a is greater than b");
పాస్కల్
If a < b Then
    Begin
        WriteLn('a is less than b');
        WriteLn('a is less than b');
    End
Else
    Begin
        WriteLn('a is greater than b');
        WriteLn('a is greater than b');
    End;
జావా
if (a < b)
{
    System.out.println("a is less than b");
    System.out.println("a is less than b");
}
else
{
    System.out.println("a is greater than b");
    System.out.println("a is greater than b");
}

పాస్కల్
If a < b And a < c Then
    WriteLn('a is the minimum of a, b, c');
జావా
if (a < b && a < c)
    System.out.println("a is the minimum of a, b, c");
పాస్కల్
If a < b Or a < c Then
    WriteLn('a is either less than b, or less than c');
జావా
if (a < b || a < c)
    System.out.println("a is either less than b, or less than c");
పాస్కల్
If Not (a < b) Then
    WriteLn('b is less than or equal to a')
Else
    WriteLn('b is greater than a');
జావా
if ( !(a < b) )
    System.out.println("b is less than or equal to a");
else
    System.out.println("b is greater than a");
పాస్కల్
If a < b Then
    Begin
       If a < c Then
            WriteLn('a is the minimum')
        Else
            WriteLn('c is the minimum');
    End
Else
    Begin
        If b < c Then
            WriteLn('b is the minimum')
        Else
            WriteLn('c is the minimum');
    End;
జావా
if (a < b)
{
    if (a < c)
        System.out.println("a is the minimum");
    else
        System.out.println("c is the minimum");
}
else
{
    if (b < c)
        System.out.println("b is the minimum");
    else
        System.out.println("c is the minimum");
}
పాస్కల్
If a <= b And a <= c Then
    WriteLn('a is the minimum')
Else If b <= a And b <= c Then
    WriteLn('b is the minimum')
Else If c <= a And c <= b Then
    WriteLn('c is the minimum');
జావా
if (a <= b && a <= c)
    System.out.println("a is the minimum");
else   if (b <= a && b <= c)
    System.out.println("b is the minimum");
else   if (c <= a && c <= b)
    System.out.println("c is the minimum");
వ్యాఖ్యలు
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION