weather=function(temp,hum){
if(temp >= 30 & hum >= 90){
print("Weather is hot and humid")
}
if(temp>=30 & hum < 90){
print("Weather is hot")
}
if(temp < 30 & hum >=90){
print("Weather is cool and humid")
}
if(temp < 30 & hum < 90 ){
print("Weather is cool")
}
}
forcasting=function(){
temp <- as.integer(readline(prompt = "Dear user enter temperature in Celcius : "))
hum <- as.integer(readline(prompt = "Dear user enter the percentage of humidity :"))
weather(temp,hum)
}
forcasting()
Dear user enter temperature in Celcius : 34 Dear user enter the percentage of humidity :56 [1] "Weather is hot"