Technology affects people's lives differently.
Some are bad and some are good.
But for me, technology gives us a chance to collaborate and connect even if we are miles away.
People are opening their mind to new kind of knowledge that can help us improve and grow.
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
Answer: an installation is the act of putting something in, a device that stays in one place, a military base, or an art piece that often involves building and different types of materials.
Explanation:
Getting your new air conditioner put in is an example of an installation.
Answer:
FOR i% = 1 TO 100
IF ((i%\3) = i%/3) AND ((i%\7) = i%/7) THEN
PRINT i%
END IF
NEXT i%
Explanation:
Of course using MOD would be cleaner, but another way to check if a number is integer divisable is to compare the outcome of an integer division to the outcome of a floating-point division. If they are equal, the division is an integer division.
The program outputs:
21
42
63
84