Write a program that asks the user to enter the student’s name (first and last), and his/her first exam grade of three students, and then display them in a neat format. After that the program will find the average of the three grades, and print it

What computer language is to be used?

BASIC? FORTRAN? C++ ?

program quiz_1;

label xy;

var
StudentName:string;
ExamScore:integer;
TotalExamScore:integer;
TotalStudent:integer;
average:real;
ans:char;

begin
TotalStudent := 0;
TotalExamScore := 0;
xy: write('Please enter StudentName: ');
readln(StudentName);
write('Please enter ExamScore: ');
readln(ExamScore);

if (ExamScore>0) then
begin
TotalStudent :=TotalStudent + 1;
TotalExamScore := TotalExamScore + ExamScore;

end

else
begin
average := TotalExamScore / TotalStudent;
end;

writeln('Name: ', StudentName);
writeln('Your exam score is ', ExamScore);
write('Is there more Student Sir, please type (Y) OR (N) ? >');
readln(ans);
if (ans='Y') then
goto xy;
average := TotalExamScore / TotalStudent;
writeln('The average score is ', average:2:2);
readln;
end.

To write a program that prompts the user to enter the student's name and exam grades, and then displays them in a neat format along with the average grade, you can follow these steps:

1. Start by declaring three variables to store the names and grades of the three students.
2. Prompt the user to enter the name and grade of each student using the input() function, and store them in the respective variables. Repeat this process three times to get the information for all three students.
3. Calculate the average grade by summing up the three grades and dividing the total by 3.
4. Print the collected information in a neat format using the print() function. Include the student names and their respective grades.
5. Finally, print the average grade.

Here's an example of how the program can be written in Python:

```python
# Collect information for three students
student1_name = input("Enter the First Student's Name: ")
student1_grade = float(input("Enter the First Student's Grade: "))

student2_name = input("Enter the Second Student's Name: ")
student2_grade = float(input("Enter the Second Student's Grade: "))

student3_name = input("Enter the Third Student's Name: ")
student3_grade = float(input("Enter the Third Student's Grade: "))

# Calculate the average grade
average_grade = (student1_grade + student2_grade + student3_grade) / 3

# Display the information in a neat format
print("\nStudent Information:")
print("-" * 20)
print("Name\t\tGrade")
print("-" * 20)
print(f"{student1_name}\t\t{student1_grade}")
print(f"{student2_name}\t\t{student2_grade}")
print(f"{student3_name}\t\t{student3_grade}")

# Display the average grade
print("\nAverage Grade:", average_grade)
```

You can run this program in a Python environment and enter the information for each student when prompted. The program will then display the collected information in a neat format and print the average grade at the end.