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:
ICT is the abbreviated form of Information and Communication. It included different technologies like mobile phones, computers, USBs etc.
Following are two precautionary measures which should be observed when using any kind of ICT:
- Use of Antivirus: It can used to protect anything placed inside the technology especially from hacking and viruses which can create many issues.
- Backup Data: Creating a backup of the data stored in the device is important as it can be recalled when the device malfunctions. Backup of the data can be created through using USBs, CDs etc or through cloud storage
Answer:
1. There are many ways to write an algorithm. Some are very informal, some are quite formal and mathematical in nature, and some are quite graphical. The instructions for connecting a DVD player to a television are an algorithm. A mathematical formula such as πR2 is a special case of an algorithm. The form is not particularly important as long as it provides a good way to describe and check the logic of the plan. The development of an algorithm, a plan is a key step in solving a problem. Once we have an algorithm, we can translate it into a computer program in some programming language. Our algorithm development process consists of five major steps.
2. computers only do what you told them to do, so If you wrote something wrong or you wasn't precise enough it might cause a massive damage and cause you to lose a lot of money.
3. You know when a problem should be solved whenever you need to make a decision that is important, or requires human intelligence and a computer doesn’t have human intelligence.
4. The process does sound familiar to me; it is like the mechanism of operation of the computer. Through reflex actions, our bodies take in input and respond sometimes without our control, such as shivering, blinking, and sneezing.
5. The brain uses chemicals to transmit information; the computer uses electricity. Even though electrical signals travel at high speeds in the nervous system, they travel even faster through the wires in a computer. Both transmit information. A computer uses switches that are either on or off ("binary").