Friday, August 2, 2019

Positive and Negative Number Lister Using Golang

Write a program using a one-dimensional array to ask the user to give a series of positive and negative numbers and then the program will display the list of positive and negative numbers and count the number of occurrence of positive and negative numbers also 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
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : August 1, 2019  Thursday  1:44 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 num_val[100] int
var a int
var b int
var c int
var count_positive int
var count_negative int

b = 0
count_positive = 0
count_negative = 0

fmt.Print("\n")
fmt.Print("\t\tPositive and Negative Number Lister")
fmt.Print("\n\n")
fmt.Print("\tHow many items  be process? : ");
fmt.Scanln(&b);
fmt.Print("\n")
for a = 1; a <= b; a++ {
fmt.Printf("\tEnter value in item no. %d : ", a);
fmt.Scanln(&num_val[a]);
}

fmt.Print("\n\n");
fmt.Print("\t===== DISPLAY RESULT =====");
fmt.Print("\n\n");
fmt.Print("\tList of Positive Numbers");
fmt.Print("\n\n");
for c = 1; c <= b; c++ {
if (num_val[c] >= 0) {
fmt.Printf("\t%d ", num_val[c]);
count_positive = count_positive + 1
}
}

fmt.Print("\n\n");
fmt.Print("\tList of Negative Numbers");
fmt.Print("\n\n");
for c = 1; c <= b; c++ {
if (num_val[c] < 75) {
fmt.Printf("\t%d ",num_val[c]);
count_negative = count_negative + 1
}
}

fmt.Print("\n\n");
fmt.Print("\t===== DISPLAY RESULT =====");
fmt.Print("\n\n");
fmt.Printf("\tNumber of Positive Numbers => %d ",count_positive);
fmt.Printf("\n\n");
fmt.Printf("\tNumber of Negative Numbers => %d ",count_negative);
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}







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")
}









Odd and Even Numbers Lister Using One Dimensional Array in Go

Write a program using a one-dimensional array that will ask you to give a series of numbers and then the program will check and display the list of odd and even numbers based on the given numbers by our user.

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
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : August 1, 2019  Thursday   11:09 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 main() {

var arr [100] int
var a int
var c int
b := 0

fmt.Print("\n")
fmt.Print("\t\tOdd and Even Numbers Lister")
fmt.Print("\n\n")
fmt.Print("\tHow many items to be process? : ");
fmt.Scanln(&b);
fmt.Print("\n")
for a = 1; a <= b; a++ {
fmt.Printf("\tEnter value in item no. %d : ", a);
fmt.Scanln(&arr[a]);
}

fmt.Print("\n\n");
fmt.Print("\t===== DISPLAY RESULT =====");
fmt.Print("\n\n");
fmt.Print("\tList of Even Numbers : ");
fmt.Print("\n\n");
for c = 1; c <= b; c++ {
if (arr[c] % 2 == 0) {
fmt.Printf("\t%d ", arr[c]);
}
}

fmt.Print("\n\n");
fmt.Print("\tList of Odd Numbers : ");
fmt.Print("\n\n");
for c = 1; c <= b; c++ {
if (arr[c] % 2 != 0) {
fmt.Printf("\t%d ",arr[c]);
}
}
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}





Highest and Lowest Value Checker Using One-Dimensional Array in Golang


Design a program using a one-dimensional array that will ask the user to give a series of numbers and then the program will check and determine which of the given number is the highest and lowest in terms of numerical value and then 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

/* highest_lowest.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() {

var  arr[20] int
var a int
b :=0
min :=0
max := 0

fmt.Print("\n")
fmt.Print("\t\tHighest and Lowest Value Checker")
fmt.Print("\n\n")
fmt.Printf("\tHow many items to be process? : ");
fmt.Scanln(&b);
fmt.Print("\n")
for  a = 0; a < b; a++{
fmt.Printf("\tEnter value in item no. %d : ",a+1);
fmt.Scanln(&arr[a]);
}
max = arr[0];
for  a = 0; a < b; a++ {
if (max < arr[a]) {
max = arr[a];
}
}

min = arr[0];
for  a = 0; a < b; a++ {
if min > arr[a] {
min = arr[a]
}
}
fmt.Printf("\n\n");
fmt.Printf("\t===== DISPLAY RESULT =====");
fmt.Printf("\n\n");
fmt.Printf("\tThe Largest Value is %d.",max);
fmt.Printf("\n\n");
fmt.Printf("\tThe Smallest Value is %d.",min);
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}







Thursday, August 1, 2019

Decimal To Word Converter Using Functions in Go

Write a program that will ask the user to give a number and then the program will convert the given number into word equivalent.

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

/* english.go
Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
Date     : July 31, 2019  Wednesday 3:11 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"
"math"
)

func pow(i int, p int) int {
return int(math.Pow(1000, float64(p)))
}

func spell(n int) string {
to19 := []string{"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve",
",Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"}

tens := []string{"Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"}
if n == 0 {
return ""
}
if n < 20 {
return to19[n-1]
}
if n < 100 {
return tens[n/10-2] + " " + spell(n%10)
}
if n < 1000 {
return to19[n/100-1] + " Hundred " + spell(n%100)
}

for idx, w := range []string{"Thousand", "Million", "Billion"} {
p := idx + 1
if n < pow(1000, (p+1)) {
return spell(n/pow(1000, p)) + " " + w + " " + spell(n%pow(1000, p))
}
}

return "error"
}

func main() {

var val_num int

fmt.Print("\n")
fmt.Print("\tDecimal To Word Converter Using Functions")
fmt.Print("\n\n")
fmt.Print("\tGive a Number     : ")
fmt.Scanf("%d",&val_num)

result := spell(val_num)

fmt.Print("\n")
fmt.Printf("\tThe given number is %d.",val_num)
fmt.Print("\n\n")
fmt.Print("\t===== TRANSLATION RESULT =====")
fmt.Print("\n\n")
fmt.Printf("\t%s",result)
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}









Biggest Number Using Functions in Go

Write a program that will ask the user four numbers and then the program will check and determine which of the given number has the biggest value and display the results on the screen. The program also asks the user if the user would like to repeat running the program or not using functions.

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

/* four.go
Authors
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Vince V. Latergo
Date : July 31, 2019  Wednesday  2:53 AM
 */
package main

import (
"fmt"
"strings"
)


func Ask4confirm() bool {
var s string

fmt.Printf("\tDo you want to continue? (Y/N): ")
_, err := fmt.Scan(&s)
if err != nil {
panic(err)
}

s = strings.TrimSpace(s)
s = strings.ToLower(s)

if s == "y"  {
start()

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

}
return false

}


func start() {

var a, b, c,d int

fmt.Print("\n")
fmt.Print("\tBiggest Number Using Functions")
fmt.Print("\n\n")
fmt.Print("\tGive any four numbers : ")
fmt.Scan(&a, &b, &c, &d)

check_four(a,b,c,d)

isConfirmed := Ask4confirm()
if isConfirmed {
start()
}
}

func check_four(a,b,c,d int) int {
var biggest int
if a > b && a > c && a > d {
biggest = a
} else if b > c && b >d {
biggest = b
} else if c > d {
biggest = c
} else {
biggest = d
}
fmt.Print("\n")
fmt.Print("\tThe Biggest in Four Number is ", biggest)
fmt.Print("\n\n")

return 0
}


func main() {
start()
}