Computer Science, asked by arka2274, 9 months ago

java program to calculate the sum​

Answers

Answered by brajeshkumar2254
1

Answer:

import java. util. Scanner; class sum.

{ public static void main(String arg[])

{ int n,sum=0,i=0;

Scanner sc=new Scanner(System. in); System. out. ...

n=sc. nextInt(); int a[]=new int[n];

System. out. println("Enter the "+n+" numbers "); while(i<n)

{ System. out. ...

a[i]=sc. nextInt

Answered by Kashvimehta4
0

import java. util. Scanner; class sum.

import java. util. Scanner; class sum.{ public static void main(String arg[])

import java. util. Scanner; class sum.{ public static void main(String arg[]){ int n,sum=0,i=0;

import java. util. Scanner; class sum.{ public static void main(String arg[]){ int n,sum=0,i=0;Scanner sc=new Scanner(System. in); System. out. ...

import java. util. Scanner; class sum.{ public static void main(String arg[]){ int n,sum=0,i=0;Scanner sc=new Scanner(System. in); System. out. ...n=sc. nextInt(); int a[]=new int[n];

import java. util. Scanner; class sum.{ public static void main(String arg[]){ int n,sum=0,i=0;Scanner sc=new Scanner(System. in); System. out. ...n=sc. nextInt(); int a[]=new int[n];System. out. println("Enter the "+n+" numbers "); while(i<n)

import java. util. Scanner; class sum.{ public static void main(String arg[]){ int n,sum=0,i=0;Scanner sc=new Scanner(System. in); System. out. ...n=sc. nextInt(); int a[]=new int[n];System. out. println("Enter the "+n+" numbers "); while(i<n){ System. out. ...

import java. util. Scanner; class sum.{ public static void main(String arg[]){ int n,sum=0,i=0;Scanner sc=new Scanner(System. in); System. out. ...n=sc. nextInt(); int a[]=new int[n];System. out. println("Enter the "+n+" numbers "); while(i<n){ System. out. ...a[i]=sc. nextInt(); sum+=a[i]

Similar questions