CA Exercise 2 - Java Tutorials For Loop Sum Average Exceptions Error

Veröffentlicht am: 16 Oktober 2014
auf dem Kanal: Red Stag Digital
3,009
14

For more: http://redstagdigital.com/

Java API For Loop: http://docs.oracle.com/javase/tutoria...
Java API System.exit(0); : http://docs.oracle.com/javase/7/docs/...
Java API Primitive Data Types: http://docs.oracle.com/javase/tutoria...

Objective
Write a Java program called SumAndAverage to prompt a user to enter a whole
number (called n) between 1 and 100 inclusive. Compute the sum of the sequence
from 1 to n and display the result. Also compute the average of the sequence from 1
to n and display the result. If a user enters a number less than 1 or greater than 100,
inform the user the number is invalid.
You are expected to use a FOR loop to compute the sum from 1 to n.


Auf dieser Seite können Sie das Online-Video CA Exercise 2 - Java Tutorials For Loop Sum Average Exceptions Error mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Red Stag Digital 16 Oktober 2014 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 3,009 Mal angesehen und es wurde von 14 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!