Write a program that will ask the user to give three numbers and then the program will compute the total sum of the three numbers using pointers 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
average.go
/* average.go
Author : Mr. Jake Rodriguez Pomperada, MAED-IT
Date : August 7, 2019 Wednesday 4:39 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(){
solve_average:=0.00
prelim :=0.00
midterm:= 0.00
final:=0.00
fmt.Printf("\n\n");
fmt.Printf("\tAverage Grade Solver Using Pointers");
fmt.Printf("\n\n");
fmt.Printf("\tGive Prelim Grade : ");
fmt.Scanf("%f",&prelim);
fmt.Printf("\tGive Midterm Grade : ");
fmt.Scanf("%f",&midterm);
fmt.Printf("\tGive Final Grade : ");
fmt.Scanf("%f",&final);
prelim_p := &prelim;
midterm_p := &midterm;
final_p := &final;
solve_average =(*prelim_p+*midterm_p+*final_p)/3;
fmt.Printf("\n\n");
fmt.Printf("\t===== DISPLAY RESULTS =====");
fmt.Printf("\n\n");
fmt.Printf("\tThe student average grade is %.2f.",solve_average);
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}
No comments:
Post a Comment