applied logic, math

posted by .

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

  • applied logic, math -

    loop {
    for (i=2;i<=100;i+=2) {print i}
    }

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. C programming

    A few questions, all involving "for" loops that I am unsure how to do (Thank you in advance for the help): Q1.) Write a table of conversions from Celsius to Rankin. Allow the user to enter the starting temperature and increment between …
  2. computer

    A-Asking the user to pick a number between 1 and 20 and having the computer pick a number between 1 and 20 and telling the user if they won or lost B- For finding the logic error in the program C- For finding and fixing the logic error …
  3. PHYSICSI

    The rotating loop in an AC generator is a square 11.0 cm on a side. It is rotated at 60.0 Hz in a uniform field of 0.800 T. Calculate the following quantities as functions of time t, where t is in seconds. (a) the flux through the …
  4. physics

    A mass m = 76.0 kg slides on a frictionless track that has a drop, followed by a loop-the-loop with radius R = 19.7 m and finally a flat straight section at the same height as the center of the loop (19.7 m off the ground). Since the …
  5. programming

    Using Raptor, create a condition loop that will ask the user for input of two numbers. The numbers should be added and the sum displayed. The loop should also ask the user if he or she wishes to enter two more numbers and perform the …
  6. Basic Computer Science

    This was the assignment: If the first parameter is less than the second parameter add the two and print the result 10 times. THIS PROGRAM IS IN JAVA. I did everything but I can't figure out how to print the result as a loop 10 times. …
  7. Computer Science

    This was the assignment: If the first parameter is less than the second parameter add the two and print the result 10 times. THIS PROGRAM IS IN JAVA. I did everything but I can't figure out how to print the result as a loop 10 times. …
  8. Physics

    A pilot, whose mass is 70.0 kg, makes a loop-the-loop in a fast jet. Assume that the jet maintains a constant speed of 325 m/s and that the radius of the loop-the-loop is 5.922 km. What is the apparent weight that the pilot feels (i.e., …
  9. College Physics

    A student of mass M = 82 kg takes a ride in a frictionless loop-the-loop at an amusement park. The radius of the loop-the-loop is R = 15 m. The force due to the seat on the student at the top of the loop-the-loop is FN = 696 N and …
  10. Physics (Mechanics)

    A student of mass M = 62 kg takes a ride in a frictionless loop-the-loop at an amusement park. The radius of the loop-the-loop is R = 19 m. The normal force by the track on the student at the top of the loop-the-loop is N1 = 100 N …

More Similar Questions