Monday, July 22, 2019

Civil Status Checker Program in Go


Write a program that will ask the person to give their civil status based of the following value 1 - Single, 2 - Married, 3 - Divorced,  4 - Annulled, 5 - Widow and 6 - Separated.   If the given year level of the student does not belong in the group it will display a message on the screen Invalid Civil Status. Try Again !!!.

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

civil_status.go

/* civil_status.go
   Written By :
   Jake R. Pomperada
   Rollyn M. Moises
   Sunday Vince V. Latergo
   July 21, 2019  Sunday 9:14 PM
   Bacolod City, Negros Occidental
*/
package main

import "fmt"

var civil_status int32
var user_name string

func main(){
fmt.Print("\n");
fmt.Print("\tCivil Status Checker Program");
fmt.Print("\n\n");
fmt.Print("\tWhat is your name? : ");
fmt.Scanln(&user_name)
fmt.Print("\tWhat is your civil status? : ");
fmt.Scanln(&civil_status)
if(civil_status == 1) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are still Single.");
}
if(civil_status == 2) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Married.");
}
if(civil_status == 3) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Divorsed.");
}
if(civil_status == 4) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Annulled.");
}
if(civil_status == 5) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Widow.");
}
if(civil_status == 6) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Separated.");
}

if (civil_status <1 || civil_status >6) {
fmt.Print("\n");
fmt.Print("\tInvalid Civil Status. Try Again !!!");
}
fmt.Print("\n\n");
fmt.Print("\tEnd of Program");
fmt.Print("\n");
}






No comments:

Post a Comment