Java
Write a for loop that prints the integers 0 through 39, separated by spaces.
for(i=0;i<=39;i++)
{
System.out.print(i+" "); // single space
}
Or
for(i=0;i<40;i++)
{
System.out.print(i+" "); // single space
}
Program:
class Loop_0_39
{
public static void main(String args[])
{
int i;
for(i=0;i<=39;i++)
{
System.out.print(i+" "); // single space
}
}
}
Output:

Java Write a for loop that prints the integers 0 through 39, separated by spaces.
1. Write a for loop that prints the sum of all positive even integers less than 200. Assume that variables i and sum are already declared. 2. Write a while loop that prints the sum of all positive odd integers less than 100. Assume that variables i and sum are already declared. 3. Write a do-while loop that prints the sum of all positive multiples of 3 less than or equal to 150. Assume that variables i and sum are...
Write a for loop that prints in ascending order all the positive multiples of 5 that are less than 175, separated by spaces. PLEASE ANSWER IN C
In Java: Create an array of Integers with 10 elements, loop (use a for loop) through the array of integers printing their values to the screen. Create an array of Strings with 10 elements, loop (use a for loop) through the array of Strings printing their values to the screen. Finally, create an ArrayList of Integers. Use the loop from part 1 above and add each integer as you print it to the ArrayList as well, then start a final...
JAVA. Write a program that reads in a series of positive integers and prints out the maximum value entered. The user will indicate they are finished entering numbers by entering zero or a negative integer.
/*Write a Java program that generates 1000 random integers, * calculates the average and prints two counts, one for the * numbers lower than the average and one for the numbers larger than the average. */ Use java thanks
ASAP MIPS PROGRAMMING Using a while loop, write an MIPS program that prints the integers from 1 to 15.
C++ Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. After the loop terminates, it prints out the sum of all the even integers read and the sum of all the odd integers read(The two sums are separated by a space). Declare any variables that are needed.
Please use Python to solve this problem: Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. After the loop terminates, it prints out, on a single line and separated by a single space, the sum of all the even integers read and the sum of all the odd integers read.
JAVA HELP! Question: Write a Java console application that investigates how well Java handles large integers. Write two loops that iterate from 0 through 35. Before each loop, set an integer variable (IV) to 1. Within each loop, print the loop count and the value of IV formatted in two columns. Within the first loop, multiply IV by 2. Within the second loop, multiply IV by the appropriate StrictMath method. The second loop will not complete since there will eventually...
Write a program that reads 2 doubles, 2 float, and 4 integers and prints them four in a line separated by tabs or spaces. The user should be prompted for input with a suitable instruction and the output should line up to the right. The numerical output should also have a minimum width of 5 and a precision of 2 decimal places to the right of the decimal. In C programming