Write a program using while loop to generate the first 10 natural number and their sum
Answers
Answered by
0
int sum=0;
while(int a>10)
{
System.out.print("enter a number");
int i=sc.nextInt();
int sum=sum+i;
}
Similar questions