Let's practice collecting multiple values. I want to write a program that helps
a user compute their average time for sprinting 100 meters. Here are the
beginnings of the average method. The method should be reading floating point
numbers from the user until the user enters zero and then it should return the
average of all of the numbers. You can use the average tester main method to
test as you go along.
Vamos a practicar la recolección de valores múltiples. Quiero escribir un programa que le ayude
a un usuario a calcular el tiempo promedio para correr 100 metros. Estos son los
inicios del método «average» (promedio). El método debería estar leyendo números de
punto flotante del usuario hasta que el usuario escriba cero y luego debería devolver el
promedio de todos los números. Pueden utilizar el método principal de «AverageTester» para
probar a medida que avanzan.
Pratiquons la collecte
de plusieurs valeurs.
Je veux écrire un programme
aidant l'utilisateur à calculer
son temps moyen pour
sprinter 100 mètres.
Voici les débuts de
la méthode moyenne.
La méthode devrait indiquer
les nombres flottants de l'utilisateur
jusqu'à ce qu'il entre 0.
Et ensuite, il devrait renvoyer
la moyenne de tous les nombres.
Vous pouvez utiliser la méthode principale
AverageTester à mesure que vous testez.
複数の値を収集する練習です 100メートル走の
平均値を計算するプログラムを書きます
ここに表示された
averageメソッドはユーザが入力する浮動小数点を
ゼロが入力されるまで読み込み続けます
そのあとすべての数の平均を表示します
AverageTesterのmainメソッドを使って
試してみてください
여러 값을 저장하는 것을 해봅시다. 100미터 달리기를 평균 얼마나
걸리는지 계산해주는 프로그램을 만들고자 합니다. average
메소드입니다. 이 메소드는 사용자로부터 소수를 읽어오고
사용자가 0을 입력할 때까지 숫자를 모두 더하고 평균을
리턴 합니다. averageTester의 메인 메소드를 이용해서
테스트를 할 수 있습니다.
Hãy thực hành thu thập nhiều gía trị.
Tôi muốn viết 1 chương trình để giúp
1 người dùng tính toán thời gian trung
bình của họ cho việc chạy nước rút 100 mét
Đây là khởi đầu của phuong thức average.
phương thức này sẽ đọc điểm nổi
từ người dùng đến khi người dùng nhập vào 0 vàsau đó nó trả về
trung bình của những con số.
Bạn có thể dùng Average tester method để
kiểm tra .