Answer:
Explanation:
public class Controlador: MonoBehavior
{
// we declare velocity variable, we can change the value to get more speed
public float velocidad = 3f;
void Start()
{
}
void Update()
{
// with this condition we select the key for the movement.
// for example the left arrow or the letter "a"
if (Input . GetKey(KeyCode . LeftArrow) |I Input . GetKey("a"))
{
transform . position += Vector3 . left * velocidad * Time . deltaTime;
}
if (Input . GetKey(KeyCode . RightArrow) |I Input . GetKey("d"))
{
transform . position += Vector3 . right * velocidad * Time . deltaTime;
}
if (Input . GetKey(KeyCode . UpArrow) |I Input . GetKey("w"))
{
transform . position += Vector3 . up * velocidad * Time . deltaTime;
}
if (Input . GetKey(KeyCode . DownArrow) |I Input . GetKey("s"))
{
transform . position += Vector3 . down * velocidad * Time . deltaTime;
}
}
}
Someone answer this because I need to know as well
\
answer:
DirectX.
hopefully this is helpful.
Answer:
public class num9 {
public static void main(String[] args) {
int sum =0;
int num =5;
for(num =5; num<=500; num+=5){
System.out.println(num);
sum +=num;
}
System.out.println(sum);
}
}
Explanation:
- Declare and initialize the variables sum and num
- Use a for loop with the condition for(num =5; num<=500; num+=5) Since the loop will increment by 5 and run from 5 to 500
- Within the loop, add num to sum at each iteration
- Print all elements on seperate lines
- Outside the loop, print the final value of sum
Create a for loop
Explanation:
10:A program that assigns the sum 20,30,40
20: input 20,30,40
30:sum input
40: print total
End