write a jva program to find the sum of first five natural numbers
Answers
Answered by
2
Answer:
Using Java for Loop
- 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)
- {
Answered by
5
Refer to the above attachment
Attachments:
Anonymous:
please mark as BRAINLIEST
Similar questions