Using scanner class, write a program to find and display the sum of any ten numbers entered by the user from the console.
Answers
Answered by
5
// A sample program to display the sum of any 10 numbers
import java.util.Scanner;
public class SumToken
{
public static void main(String[]args)
{
Scanner in=new Scanner(System.in);
System.out.println("Enter any 10 numbers");
int i,n,s=0
{
n=in.nextInt();
s=sn;
}
}
}
siddhartharao77:
In the given program : sn was not declared.
Answered by
0
Answer:import java.util.Scanner;
public class SumToken
{
public static void main(String[]args)
{
Scanner in=new Scanner(System.in);
System.out.println("Enter any 10 numbers");
int i,n,s=0
{
n=in.nextInt();
s=sn;
}
}
}
Similar questions