Computer Science, asked by pallavi1967, 6 months ago

Write a Java Program to Calculate and print Sum of first 100 Even Numbers using For Loop​

Answers

Answered by MichSuchana91
3

import java.util.*;

public class Sum{

public static void main (String args[]){

int sum=0;

for(int i=2; i<=100; i+=2)

sum+=i; // it means sum=sum+i ;

System.out.println(Sum of 1st 100 natural number=+sum);

}

}

Edited:) it's my pleasure @singhanita5749 ,, BeBrainly..

Explanation:

•Beginners may make sillyMistakes

in some parts of Any Programming

So, i ve tried to make them highlight(bold).

•if you re learning other languages from this small sourceCode,,

thn bst of luk to all gr8 Coders

Answered by seo80
0

Answer:

i m seo08

Explanation:

i lost my account

All my friends plz follow mw hwre

Similar questions