JAVA : Program to find sum of all integer greater than 100 and less than 200, that are divisible by 5
Code:
class findsum//for more program please visit www.programtubenotes.blogspot.in
{
public static void main(String args[])
{
int a,sum=0;
for(a=100;a<=200;a++)
{
if(a%5==0)
sum=sum+a;
}
System.out.println("Sum="+sum);
}
}
Output:
Sum=3150
Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answ...
-
Character I/O: Visual Basic provides some excellent ways for input and output operations. Input can be taken using TextBox, InputBox, ...
-
Design a form contains a sorted list alphabetically such that the user can add the item from text to the list after click on command button...
-
Scientific Calculator Created Using Visual Basic This is a calculator that resembles a typical scientific calculator , albeit a simpler ...