Ask Question

Write a for loop that prints in ascending order all the positive integers less than 200 that are divisible by both 2 and 3, separated by spaces.

+1
Answers (1)
  1. 9 October, 09:45
    0
    Int i = 1;

    for (i = 1; i < = 200; I++) {

    if ((i % 2) = = 0 && (i % 3) = = 0) {

    printf ("%i ", i);

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a for loop that prints in ascending order all the positive integers less than 200 that are divisible by both 2 and 3, separated by ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers