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
Physics,
3 months ago
Math,
3 months ago
Math,
3 months ago
English,
6 months ago
English,
6 months ago
India Languages,
11 months ago
India Languages,
11 months ago
Geography,
11 months ago