Computer Science, asked by abhirup7151, 5 months ago

wap accept five number and find out sum using loop​

Answers

Answered by adityasharma09
0

Answer:

import java.util.*;

class abc

{

public static void main(String args[])

{

Scanner sc=newScanner(System.in);

int i, a, sum=0;

for(i=1;i<6;i++)

{

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

a=sc.nextInt();

sum=sum+a;

}

}

}

Similar questions