Answers for "if statement with ? :"

C#
3

if condition

#converting weight into pounds orkilograms.
given_weight=int(input('given_weight'))
unit=input('(K)G or (L)bs')

if unit.upper() == 'K':
    pounds=given_weight/0.45
    print('weight in pounds',pounds)
else:
    kilograms=given_weight*0.45
    print('weight in kg',kilograms)
________________________________________________________________________________
Posted by: Guest on December-03-2021
7

if statement

is this condition true ? yes : no
Posted by: Guest on March-02-2020
0

example of an IF Statement

public class Test {

   public static void main(String args[]) {
      int x = 10;

      if( x < 20 ) {
         System.out.print("This is if statement");
      }
   }
}
Posted by: Guest on August-31-2021

C# Answers by Framework

Browse Popular Code Answers by Language