package gene; import java.util.Scanner; public class Gene { static Scanner console=new Scanner(System.in); public static void main(String[] args) { int sum=0; for(int i=0;i<=20;i++){ if((i%2)==0){ sum=i+sum; } } System.out.println("sum = "+sum); } }
Subscribe to:
Post Comments
(
Atom
)
Popular Posts
-
Here is the output of our simple calculator: Here's the code: Dim a, b, r As Integer Dim opr As String Private Sub add_Click(...
-
I am using the manga WORKING. This is the output of this project For this tutorial you need to know : - HTML - CSS - Javasci...
-
The user should input this following letter: if Y the result should be YELLOW , if R the result should be RED , if W the result should b...
-
Adding social icons on your site it's so easy just follow this steps. Step 1: You can customize or select your own social icons any d...
Blog Archive
-
▼
2012
(
12
)
-
▼
August
(
12
)
- Simple Calculator Program using Microsoft Visual B...
- How to Add Social Icons on Blogger
- Color Program
- ATM System
- What is Cloud Computing?
- Fibonacci Method Turbo C
- How to Add Scroll bar when posting codes on Blogger
- Adding even numbers (1-20)
- Adding even numbers from 1-20 applying METHODS
- Diamond (Nested for-loop)
- Circle: Diameter,Circumference,Area
- Food Menu Program
-
▼
August
(
12
)
0 comments :
Post a Comment