java program to find the sum of the first ten natural numbers using while loop
Answers
Answered by
6
Explanation:
importjava.util.*;
class sum
{
public static void main()
{
int i ,s=0;
for(i=1;i<=10;i++)
{
s=s+i;
}
S.o.p.ln("sum is "+s);
}
}
Similar questions