Computer Science, asked by Vinuth1861, 10 months ago

Write a program using while loop to generate the first 10 natural number and their sum

Answers

Answered by adityasharma09
0

int sum=0;

while(int a>10)

{

System.out.print("enter a number");

int i=sc.nextInt();

int sum=sum+i;

}

Similar questions