In [1]:
totalObject <- 10
ObjectFloor2 <- 4
ObjectFloor3 <- 4
totalObjectQ2 <- 14
In [2]:
Total <- (2*(totalObject - 1) -1 )* 3
TotalFloor2 <- (2*(ObjectFloor2-1) -1) * 1 + 1
TotalFloor3 <- (2*(ObjectFloor3-1) -1) * 2 + 2
TotalQ2 <- (2*(totalObjectQ2 - 1) -1 )* 3
In [3]:
cat("Q1- The mimimum amount of step is: ", Total - TotalFloor2 - TotalFloor3, '\n')
cat("Q2- The mimimum amount of step is: ", TotalQ2 - TotalFloor2 - TotalFloor3, '\n')