Showing posts with label Average and Percentage of Five Subjects Solver Using Golang. Show all posts
Showing posts with label Average and Percentage of Five Subjects Solver Using Golang. Show all posts

Sunday, June 30, 2019

Average and Percentage of Five Subjects Solver Using Golang

Write a program that will ask the student to give five grades on the following subjects English, Physics, Chemistry, Mathematics, and Computer.  The program will solve the total marks, average marks, and percentage of the five subject grades being given by the 
student 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


Program Listing

// average.go

package main
import "fmt"
      
func main(){
    var eng, phy, chem, math, comp float32
    var total, average, percentage float32
         
    fmt.Print("\n\n")
    fmt.Print("\tAverage and Percentage of Five Subjects Solver")
    fmt.Print("\n\n")
    fmt.Print("\tEnter Marks of Five Subjects : ")
    fmt.Scan(&eng,&phy,&chem,&math,&comp)
   
/* Calculate total, average and percentage */
    total = eng + phy + chem + math + comp;
    average = total / 5.0;
    percentage = (total / 500.0) * 100;

    fmt.Print("\n\n")
    
    fmt.Print("\tTotal Marks = ")
    fmt.Printf("\t%0.2f ",total)
    fmt.Print("\n")
    fmt.Print("\tAverage Marks = ")
    fmt.Printf("%0.2f ",average) 
    fmt.Print("\n\n")
    fmt.Print("\tPercentage = ")
    fmt.Printf("%0.2f",percentage) 
    fmt.Print("%") 
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}