Questions LLC
Login
or
Sign Up
Ask a New Question
Programming
Loop Structures
Number Generation
writing a program using loop structure, need the equation to produce all even numbers from 2-100 to print out each time I go through the loop
1 answer
loop {
for (i=2;i<=100;i+=2) {print i}
}
You can
ask a new question
or
answer this question
.
Related Questions
George is creating a program that will ask the user to input their grade in school. George wants to prevent the program crashing
What structure should be used to create an infinite loop in a block-based program?
(1 point) Responses if statement if statement
1. What process locates a specific set of characters in a data set?
a. data collection b. data analysis c. pattern matching d.
If the number of times that I leave for a peach will be determined by whether the user inputs the correct answer to a trivia
What structure should be used to create an infinite loop in a block-based program?
(1 point) A. if statement B. for loop C. while
What structure should be used to create an infinite loop in a block-based program?
(1 point) if statement O for loop while loop O
What structure should be used to create an infinite loop in a block-based program?
A. If statement B. For loop C. While loop D.
how do i write java loop program where the user enters 10 random numbers. the program then collects the prime numbers from that
Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
(1 point) Responses
Which structure is best to use when the user has four chances to enter the correct information into a program?
an if statement a