Write a java program to find the sum of the 1st 10 even natural numbers.
Answers
Answered by
1
public class SumOfNaturalNumber1.
{
public static void main(String[] args)
{
int i, num = 10, sum = 0;
//executes until the condition returns true.
for(i = 1; i <= num; ++i)
{
Similar questions
Geography,
2 months ago
Science,
2 months ago
English,
4 months ago
English,
4 months ago
India Languages,
10 months ago
India Languages,
10 months ago
Geography,
10 months ago