2
I need to add two typed notes to find the final R average (Nota1 + 2*Nota2)/3
but I don’t know how it makes the final calculation for the script to work without error
print("Escreva seu nome")
W<-scan(what="character",nmax=1)
print("Qual a nota1?")
X<-scan(what="character",nmax=1)
X<-as.numeric(X)
print("Qual a nota2?")
Y<-scan(what="character",nmax=1)
Y<-as.numeric(Y)
Code line I don’t know.
if (Z<6) {print("Faça a G3.")} else {print("Aprovado.")}
RGui
Is not
Z <- (Nota1 + 2*Nota2)/3
even before instructionif
?– Rui Barradas