Thursday, August 1, 2019

One Dimensional Array Demonstration in Go

Here is a very simple program to demonstrate how to use a one-dimensional array in Go.  I am using Goland 2018.3 as my text editor in writing my Go programs.

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

/* example_arrays.go
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : July 31, 2019  Wednesday  9:22 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() {

score := [12] int {5,10,15,20,25,30,35,40,45,50,55,60};

    a := 0
fmt.Print("\n")
fmt.Printf("\tOne Dimensional Array Demonstration in Go");
fmt.Printf("\n\n");
for a=0; a<12; a++ {
   fmt.Printf("\t");
   fmt.Printf("score[%d]  = %d\n ",a+1,score[a]);
}
fmt.Print("\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}



Tuesday, July 30, 2019

Odd and Even Number Checker Using If Statement in Golang


Write a program that will ask the user to give a number and then the program will check if the given number is an odd or even number using if statement using Golang.

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

/* odd_even.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday  Vince V. Latergo
Date : July 28, 2019  Sunday  6:44 AM
 */

package main

import "fmt"

func main() {

var num_val int

fmt.Print("\n")
fmt.Print("\tOdd and Even Number Checker Using If Statement")
fmt.Print("\n\n")
fmt.Print("\tGive a Number : ")
fmt.Scanf("%d",&num_val);

fmt.Print("\n")

if (num_val % 2 == 0) {
fmt.Println("\tYour given number", num_val, "is an EVEN number.")
}

if (num_val % 2 != 0) {
    fmt.Println("\tYour given number",num_val, "is an ODD number.")
}
fmt.Print("\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}









Positive and Negative Number Checker Using If Statement in Golang

Write a program using if statement that will ask the user to give a number and then the program will check determine whether the given number is a positive or negative number. Let us assume the zero belongs to a positive number and display the results 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

/* positive_negative.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Latergo
Date : July 28, 2019  Sunday 6:33 AM
 */

package main

import "fmt"

func main() {

var num_val int32

fmt.Print("\n")
fmt.Print("\tPositive and Negative Number Checker Using If Statement")
fmt.Print("\n\n")
fmt.Print("\tGive a Number : ")
fmt.Scanf("%d",&num_val);

fmt.Print("\n")


if (num_val >=0) {
fmt.Println("\tYour given number", num_val, "is a POSITIVE number.")
   }

if (num_val < 0) {
fmt.Println("\tYour given number",num_val, "is a NEGATIVE number.")
}

fmt.Print("\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}








Larger Value Between Two Numbers in Go

Write a program using if statement which identifies the larger of two numbers given the user and displays the results 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


/*two_numbers.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Vince V. Latergo
Date : July 28, 2019  Sunday  10:40 PM
 */

package main

import "fmt"

func main(){

var  a,b int

fmt.Print("\n")
fmt.Print("\tLarger Value Between Two Numbers")
fmt.Print("\n\n")
fmt.Print("\tGive the First  Value   : ")
fmt.Scanln(&a)
fmt.Print("\tGive the Second Value   : ")
fmt.Scanln(&b)
fmt.Print("\n")

fmt.Print("\t===== DISPLAY RESULTS =====")
fmt.Print("\n\n")

if (a > b) {
fmt.Print("\tThe given number ",a," is much larger value than ",b, ".")
}

if (a < b) {
fmt.Print("\tThe given number ",b," is much larger than ",a, ".")
}

fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}



Qualified to Vote Program Using If Statement Using Golang


Write a program using an if statement that will ask the person's name and age. The program will greet the person by making the person's name display in upper case format and check and determine if the given age of the person is qualified to vote or not and display the results 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

/* vote.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Vince V. Latergo
Date : July 28, 2019  Sunday   6:13 AM
 */

package main

import (
"bufio"
"fmt"
"os"
"strings"

)

func main() {
consoleReader := bufio.NewReader(os.Stdin)

var age int

fmt.Print("\n")
fmt.Print("\tQualified to Vote Program Using If Statement")
fmt.Print("\n\n")
fmt.Print("\tWhat is your name?   : ")
user_name, _ := consoleReader.ReadString('\n')
fmt.Print("\n")
fmt.Print("\tWhat is your age?    : ")
fmt.Scanln(&age)

name_display := strings.ToUpper(user_name)

fmt.Print("\n")

if (age >= 18) {
fmt.Println("\tHello", name_display)
fmt.Print("\tAt the age of ",age, " years old you are qualified to vote.")
}

if (age < 18) {
fmt.Println("\tHello", name_display)
fmt.Print("\tAt the age of ",age, " years old  sorry you are still a minor.")
}

fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}














Gender Checker Using If Statement in Golang


Write a program using an if statement that will ask the person's name and gender. The user can type either letter F for Female or M for Male. The program will greet the person by making the person's name display in upper case format and display what is the gender of the person's 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

/* gender.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Vince V. Latergo
Date : July 28, 2019  Sunday   5:42 AM
 */

package main

import (
"bufio"
"fmt"
"os"
"strings"
"unicode"
)

func main() {
consoleReader := bufio.NewReader(os.Stdin)
fmt.Print("\n")
fmt.Print("\tGender Checker Using If Statement")
fmt.Print("\n\n")
fmt.Print("\tWhat is your name?   : ")
user_name, _ := consoleReader.ReadString('\n')
fmt.Print("\n")
fmt.Print("\tSelect M - Male  F - Female")
fmt.Print("\n\n")
fmt.Print("\tWhat is your gender? : ")
gender, err := consoleReader.ReadByte()
name_display := strings.ToUpper(user_name)
if err != nil {
panic(err)
}
gender = byte(unicode.ToLower(rune(gender)))

fmt.Print("\n")

if (gender == 'f') {
fmt.Println("\tHello", name_display)
fmt.Printf("\tYou are certified FEMALE.")
}
if (gender == 'm') {
fmt.Println("\tHello", name_display)
fmt.Printf("\tYou are certified MALE.")
}

if (gender != 'f'  && gender  != 'm') {
fmt.Printf("\tInvalid Gender Value. Try Again.")
}
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}












User Defined Function in Golang

Here is a simple program that I wrote using Golang that demonstrate how to write a user-defined function in Golang.

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

/*example1.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Vince V. Latergo
Date : July 30, 2019  Tuesday  5:24 AM
 */

package main

import "fmt"

func UserDefinedFunction() {
fmt.Print("\n\n")
fmt.Println("\t\t\t\tIntroduction to Go Programming")
fmt.Println("\t\t\t\t\t\t\tBy")
fmt.Println("\tJake R. Pomperada, Rollyn M. Moises and Sunday Vince V. Latergo ")
fmt.Print("\n\n")
}

func main() {
fmt.Print("\n")
fmt.Print("\tExample of User Defined Function in Go")
UserDefinedFunction();
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}



Addition of Three Numbers Using Functions Using Go


Write a program that will ask the user to give three numbers and then the program will compute the sum of the three numbers and display the results on the screen using function statement.

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

/* add_functions.go
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : July 30, 2019  Tuesday  5:39 AM
   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 add(a int, b int, c int) int {
return a + b + c
}


func main() {

var val1 int
var val2 int
var val3 int

fmt.Print("\n")
fmt.Print("\tAddition of Three Numbers Using Functions")
fmt.Print("\n\n")
fmt.Print("\tEnter Three Numbers : ")
fmt.Scanf("%d %d %d",&val1,&val2,&val3)

sum := add(val1,val2,val3)

fmt.Print("\n")
fmt.Println("\tThe sum of",val1,",",val2, "and",val3 ,"is",sum,".")
fmt.Print("\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}