Kategóriák: Minden - input - variables - report - calculations

a Brook Tomlin 9 éve

347

Loop in Java Structure

A process is described for generating a report card using a loop structure. The procedure starts by initializing a counter and incrementing it until a specified limit is reached. Data input involves capturing the student'

Loop in Java Structure

Calculations/Processing

Calculations

calculate the average (add all marks)/4

Declare Variables

String

homeroom
name
subject4
subject3
subject2
subject 1

Double

average
mark1
mark2

mark3

mark4

Print the Data (Report Card)

Print to Console

Print out the name
Print out 1st subject and mark

Print out 2ndsubject and mark

Print out 3rdsubject and mark

Print out 4thsubject and mark

Inputting the Data

Input name and 4 subject and 4 marks

Prompt message and a read ___ for each variable

LOOP

Add 1 to Counter (until 3)

Create Report

Start One Counter

Loop in Java Structure