Friday, August 2, 2019

Student Grades Checker in Go

Design a program using a one-dimensional array that will ask the user to give a series of grades both passing and failing grades and the program will check and list down the passing and failing grades and display the result on the screen.


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com


Sample Program Output


Program Listing

/* pass_failed.go
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : August 1, 2019  Thursday  12:40 PM
   Location : Bacolod City, Negros Occidental
   Website  : http://www.jakerpomperada.com
   Emails   : jakerpomperada@gmail.com and jake_pomperada@tup.edu.ph
 */

package main

import "fmt"

func main() {

var grade[100] int
var a int
var b int
var c int
var count_pass int
var count_fail int

b = 0
count_pass = 0
count_fail = 0

fmt.Print("\n")
fmt.Print("\t\tStudent Grades Checker")
fmt.Print("\n\n")
fmt.Print("\tHow many grades  be process? : ");
fmt.Scanln(&b);
fmt.Print("\n")
for a = 1; a <= b; a++ {
fmt.Printf("\tEnter grade in item no. %d : ", a);
fmt.Scanln(&grade[a]);
}

fmt.Print("\n\n");
fmt.Print("\t===== DISPLAY RESULT =====");
fmt.Print("\n\n");
fmt.Print("\tList of PASSED Grades");
fmt.Print("\n\n");
for c = 1; c <= b; c++ {
if (grade[c] >= 75) {
fmt.Printf("\t%d ", grade[c]);
count_pass++
}
}

fmt.Print("\n\n");
fmt.Print("\tList of FAILED Grades ");
fmt.Print("\n\n");
for c = 1; c <= b; c++ {
if (grade[c] < 75) {
fmt.Printf("\t%d ",grade[c]);
count_fail++
}
}

fmt.Print("\n\n");
fmt.Print("\t===== DISPLAY RESULT =====");
fmt.Print("\n\n");
fmt.Printf("\tNumber of Passed Grades => %d ",count_pass);
fmt.Printf("\n\n");
fmt.Printf("\tNumber of Failed Grades => %d ",count_fail);
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}









No comments:

Post a Comment