Ask a New Question

Question

Write a program using for loop along with switch case
7 years ago

Answers

Steve
for (i=1;i<3;i++) {
s = "";
switch x {
case 1: s = "Do";
case 2: s += " your own";
case 3: s += " work!";
}
}

modify the syntax for the language of your choice.
7 years ago

Related Questions

Shrinking Loop. A circular loop of flexible iron wire has an initial circumference of 167 cm, but it... Write a loop that will continuously prompt the user for integers to sum, -1 to exit. Sum these value... A loop-the-loop ride at an amusement park has a radius of 5 m. At the highest point, the rider moves... writing a program using loop structure, need the equation to produce all even numbers from 2-100 to... how do i write java loop program where the user enters 10 random numbers. the program then collects... Write a loop that calculates the (float) sum of the following series of numbers: 1/10 + 2/9 + 3/8 +... Write a loop to print all elements in hourly_temperature. Separate elements with a -> surrounded by... Write a loop that prints each country's population in country_pop. Sample output with input: 'Ch... Write a loop that reads positive integers from standard input, printing out those values that are gr... write a infinite loop in python
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use