answersLogoWhite

0


Best Answer

public class TestBB {

/**

* @param args

*/

public static void main(String[] args) {

int sum = 0;

int i = 0;

do {

sum = sum + i;

i++;

} while (i <= 100);

System.out.println("Total of 100 numbers is: " + sum);

}

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

public class Test {

public static void main(string args[]){

int sum = 0;

for(int i = 0; i <= 100; i++){

sum = sum + i;

}

System.out.println("Sum = " + sum);

}

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the sum of the first 100 integers using the do while loop and display the result?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which culture was the first to use integers?

Integers are the whole numbers. Indian and Chinese mathematician were the first to contribute in the concept of using integers.


How do you you Create 2 text-field and 1 button in java using applet and then get the input as integers in 2 text-field and to display the output in label already created when you click the button?

How to you Create 2 text-field and 1 button in java using applet and then get the input as integers in 2 text-field and to display the output in label already created when you click the button? please send immediately,needed urgently


What is the sum of the first forty positive integers?

The sum of the first forty positive integers can be calculated using the formula for the sum of an arithmetic series, which is (n/2)(first term + last term) where n is the number of terms. In this case, the sum is (40/2)(1 + 40) = 820.


How are integers used in skateboarding?

integers are used in skateboarding by using positive integers like 180 360 540 720 and 900


Who was the first lady to begin using the china room to display the pieces of china?

the get nasty booty scracher


What is the sum of the first 1000 positive integers?

Using Gauss's method, 1+2+3...1000= 500x1001=500500 Answer:500500


What is the sum of the 10 positive integers?

The sum of the first 10 positive integers, using the formula N1 + (N1 + 1) + ... + N2 = N2 * (N2 + 1) / 2 - (N1 - 1) * N1 / 2 is: 55


What are 3 consecutive integers whose sum is 81?

The integers are 26, 27 and 28. Using just oddconsecutive integers you have 25, 27 and 29.


How can the pH of a solution be measured?

Using a pH indicator such as litmus which displays a colour change based on the pH of the solution, or using a sold state digital probe which would give a numerical result on the display.


What is a profit of 27 using integers?

The profit of 27 using an integer is 12


What are three consecutive integers such that the sum of five times the first six times the second and seven times the third is 148?

This doesn't work for integers. Using 7, 8 and 9 comes up with 146 which is the closest you can get.


Who was the first lady to begin using the China room to display pieces of China and glass?

the get nasty booty scracher