Lab 6

Using the vi editor, a program was created to display grades for classes based on percentages for each student. The program asks for the student’s name, the course code, and the grade percent for that course. After gathering this information, the program then sorts the grade into letter grade categories and outputs a one line sentence with the information. Below is the program being displayed and running.

Lab6

Lab6script

Below, the vi editor is used to create a program to collect an integer and finds the sum of the the first N integers of that which was entered. A while loop was used to steadily decrease the value of n and add each value to a sum of these values until 0 was reached. The result of this addition was then displayed on the screen to the user. The below examples represent the written program and the program running.

sum

sumrun

Leave a Reply

Your email address will not be published. Required fields are marked *