Horje
add infinite numbers to variable java Code Example
add infinite numbers to variable java
	Scanner sc = new Scanner(System.in);
	int value = 0;
	int total = 0;

    //adds a number to the total variable every occurence of the loop
		
	for (;;) {
			
		System.out.println("Enter a number");
		value = sc.nextInt();
			
		total += value;
			
		System.out.println("You added " + value + " to the total");
		System.out.println("The total is " + total + " so far");
			
		value = 0;		
			
	}




Java

Related
pioneer meaning Code Example pioneer meaning Code Example
how to set default parameter in java Code Example how to set default parameter in java Code Example
stream reduce stringbuilder Code Example stream reduce stringbuilder Code Example
sha1 Code Example sha1 Code Example
set default messaging app android manifest Code Example set default messaging app android manifest Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9