Many numbers and sum - Practice Exercises Java Lesson 4: Structures and Strings Exercise 4.5: Many numbers and sum Objetive: Create a program which asks the user for several numbers (until he enters "end" and displays their sum). When the execution is going to end, it must display all the numbers entered, and the sum again, as follows: Enter a number: 5 Sum = 5 Enter a number: 3 Sum = 8 Enter a number: end The numbers are: 5 3 The sum is: 8 Source Code: JAVA C# import java.util.*; public class Main { public static void main() { float[] numbers = new float[1000]; String entrada; System.out.print("Enter a number: "); entrada = new Scanner(System.in).nextLine(); } } Copy Exercise to ClipBoard Copy Code to ClipBoard Exercisey 4.5
More exercises for Lesson 4 Previous Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Next >>