Monday, July 22, 2019

Year Level Checker Program in Go

 Write a program that will ask the student to give their year level based of the following value 1 - Freshmen, 2 - Sophomore, 3 - Juniors and  4 - Seniors. If the given year level of the student does not belong in the group it will display a message on the screen  Invalid Year Level. 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

year_level.go

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

import "fmt"

var year_level int32

func main(){
fmt.Print("\n");
fmt.Print("\tYear Level Checker Program");
fmt.Print("\n\n");
fmt.Print("\tWhat is your year level? : ");
fmt.Scanln(&year_level)
if(year_level == 1) {
fmt.Print("\n");
fmt.Print("\tYou Belong to Freshmen.");
}
if(year_level == 2) {
fmt.Print("\n");
fmt.Print("\tYou Belong to Sophomore.");
}
if(year_level == 3) {
fmt.Print("\n");
fmt.Print("\tYou Belong to Juniors.");
}
if(year_level == 4) {
fmt.Print("\n\n");
fmt.Print("\tYou Belong to Seniors.");
}

if (year_level <1 || year_level >4) {
fmt.Print("\n");
fmt.Print("\tInvalid Year Level. Try Again !!!");
}
fmt.Print("\n\n");
fmt.Print("\tEnd of Program");
fmt.Print("\n");
}





No comments:

Post a Comment