Dain1234 / CSA1674-DWDM

0 stars 0 forks source link

Experiment 1(addition,subtraction,even or odd) #1

Open Dain1234 opened 1 year ago

Dain1234 commented 1 year ago

WhatsApp Image 2023-02-02 at 1 45 14 PM

Dain1234 commented 1 year ago

num1=as.integer(readline(prompt="Enter a number1:")) num2=as.integer(readline(prompt="enter a number2:")) num3=num1+num2 print(num3)

Dain1234 commented 1 year ago

Subtraction: WhatsApp Image 2023-02-02 at 1 45 29 PM

Dain1234 commented 1 year ago

num1=as.integer(readline(prompt="Enter a number 1:")) num2=as.integer(readline(prompt="Enter a number 2:")) num3=num2-num1 print(num3)

Dain1234 commented 1 year ago

Even or Odd: WhatsApp Image 2023-02-02 at 1 45 45 PM

Dain1234 commented 1 year ago

num=as.integer(readline(prompt="Enter a number:")) if(num%%2==0){ print("Number is even") }else{ print("number is odd") }