Open Dain1234 opened 1 year ago
num1=as.integer(readline(prompt="Enter a number1:")) num2=as.integer(readline(prompt="enter a number2:")) num3=num1+num2 print(num3)
Subtraction:
num1=as.integer(readline(prompt="Enter a number 1:")) num2=as.integer(readline(prompt="Enter a number 2:")) num3=num2-num1 print(num3)
Even or Odd:
num=as.integer(readline(prompt="Enter a number:")) if(num%%2==0){ print("Number is even") }else{ print("number is odd") }