Monday, December 24, 2018

BIODATA STUDENT INFORMATION SYSTEM IN C IMPROVED CODE

A more improve code that I wrote on Biodata Student Information System in C. That works in Turbo C++ and Dev C++.  I hope you will find my work useful thank you.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com




Sample Program Output



Program Listing


#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <ctype.h>
#include <string.h>

main( )
{
FILE  *fp, *ft ;
char  another, choice ;
struct student
{
char  stud_id[200];
char  name[200];
char  course[200];
char  sex;
int   age;
char  address[200];
char  email[200];
char  subject[200];
float prelim,midterm,endterm,final_grade;
} ;

struct student info ;
char student_id[200];
int flag=0;

long int  recsize ;

fp = fopen ( "BIODATA.DAT", "rb+" ) ;

if ( fp == NULL )
{
fp = fopen ( "BIODATA.DAT", "wb+" ) ;

if ( fp == NULL )
{
puts ( "Cannot open file" ) ;
exit(0) ;
}
}

recsize = sizeof ( info ) ;

while (1)
{
        system("CLS");
        printf("\n");
/* textcolor(LIGHTGREEN); */
        printf("\n======================================");
        printf("\n");
        printf("\nBIODATA  STUDENT INFORMATION SYSTEM ");
        printf("\n");
        printf("\n======================================");
   /* normvideo(); */
printf("\n\n");
printf ( "1. ADD STUDENT RECORDS") ;
printf("\n");
printf ( "2. DISPLAY STUDENT RECORDS" ) ;
printf("\n");
printf ( "3. UPDATE STUDENT RECORDS" ) ;
printf("\n");
printf ( "4. SEARCH STUDENT RECORDS" ) ;
printf("\n");
printf ( "5. DELETE STUDENT RECORDS" ) ;
printf("\n");
printf ( "6. QUIT PROGRAM" ) ;
printf("\n\n");
printf ("SELECT YOUR CHOICE : ") ;
fflush (stdin) ;
choice = getche() ;
switch (choice)
{
case '1' :
fseek (fp, 0 ,SEEK_END) ;
another = 'Y' ;

while ( another == 'Y' )
{
system("cls");
printf("\n\n");
                    printf("=== Add New Student Record in the Database ===");
                    printf("\n\n");
printf("Enter Student ID             : ");
scanf("%s",&info.stud_id);
printf("Enter Student Name           : ");
fflush(stdin);
gets(info.name);
printf("Enter Course                 : ");
fflush(stdin);
gets(info.course);
    printf("Enter Gender M/F             : ") ;
                    info.sex = toupper(getche());
                    printf("\n");
                    printf("Enter Age                    : ") ;
                    scanf("%d",&info.age);
                    printf("Enter Home Address           : ");
                    fflush(stdin);
gets(info.address);
printf("Enter Email Address          : ");
scanf("%s",&info.email);
printf("Enter Subject                  : ");
fflush(stdin);
gets(info.subject);
printf("Enter Prelim Grade           : ");
scanf("%f",&info.prelim);
printf("Enter Midtem Grade           : ");
scanf("%f",&info.midterm);
printf("Enter Endterm Grade           : ");
scanf("%f",&info.endterm);
info.final_grade = (info.prelim * 0.20) + (info.midterm * 0.30) + (info.endterm * 0.50);
printf("\n\n");
                    printf("\nFinal Grade         : %2.0f",info.final_grade);
fwrite ( &info, recsize, 1, fp ) ;
printf("\n\n");
printf ("\nAdd another Record (Y/N) : ") ;
fflush (stdin) ;
another = toupper(getche()) ;
}

break ;

case '2' :
    system("cls");
rewind (fp);
printf("\n\n");
                printf("=== View the Records in the Database ===");
                printf("\n\n");
while ( fread ( &info, recsize, 1, fp ) == 1 )
         {
    printf("\n");
            printf("\n Student ID          : %s",info.stud_id);
        printf("\n Name                : %s",info.name);
    printf("\n Course              : %s",info.course);
    printf("\n Gender              : %c",info.sex);
    printf("\n Age                 : %d",info.age);
    printf("\n Home Address        : %s",info.address);
    printf("\n Email Address       : %s",info.email);
    printf("\n Subject             : %s",info.subject);
    printf("\n Prelim Grade        : %2.0f",info.prelim);
    printf("\n Midterm Grade       : %2.0f",info.midterm);
    printf("\n Endterm Grade       : %2.0f",info.endterm);
    printf("\n");
    info.final_grade = (info.prelim * 0.20) + (info.midterm * 0.30) + (info.endterm * 0.50);
    printf("\n Final Grade         : %2.0f",info.final_grade);
printf("\n\n");
        }
            system("pause");
            break ;

case '3' :
               rewind (fp);

another = 'Y' ;
while (another == 'Y')
{
                    system("cls");
                    printf("=== Update Student Records in the Database ===");
                    printf("\n\n");
printf("\n");
                    printf("Enter Student ID Number      : ");
scanf("%s",&student_id);
rewind (fp) ;
while (fread( &info, recsize, 1, fp ) == 1 )
{
                    if ( strcmp ( info.stud_id, student_id ) == 0 )
                    {
                        printf("Enter Student ID       : ");
                        scanf("%s",info.stud_id);
                        printf("Enter Student Name     : ");
                        fflush(stdin);
                        gets(info.name);
                        printf("Enter Course           : ");
                        fflush(stdin);
                        gets(info.course);
                        printf("Enter Gender M/F       : ") ;
                        info.sex = toupper(getche());
                        printf("\n");
                        printf("Enter Age              : ") ;
                        scanf("%d",&info.age);
                        printf("Enter Home Address     : ");
                        fflush(stdin);
                        gets(info.address);
                        printf("Enter Email Address    : ");
                        scanf("%s",&info.email);
                        printf("Enter Subject          : ");
                        fflush(stdin);
                        gets(info.subject);
                        printf("Enter Prelim Grade     : ");
                        scanf("%f",&info.prelim);
                        printf("Enter Midtem Grade     : ");
                        scanf("%f",&info.midterm);
                        printf("Enter Endterm Grade    : ");
                        scanf("%f",&info.endterm);
                        printf("\n");
                        info.final_grade = (info.prelim * 0.20) + (info.midterm * 0.30) + (info.endterm * 0.50);
                        printf("\n Final Grade         : %2.0f",info.final_grade);
                        printf("\n\n");
                        printf("Records has been updated in the database.");
                        printf("\n\n");
                        system("pause");
fseek ( fp, - recsize, SEEK_CUR ) ;
fwrite ( &info, recsize, 1, fp ) ;
break ;
                    }
                }
             if (strcmp(info.stud_id,student_id) != 0 )
                    {
                        printf("\n\n");
                        printf("No Record in the Database.");
                        printf("\n");
                        system("pause");
                        break;
                    }
                    printf("\n\n");
printf ( "\nUpdate Another Record (Y/N) : " ) ;
fflush (stdin) ;
another = toupper(getche());
}

break ;

case '4' :
                rewind (fp);

another = 'Y' ;
while ( another == 'Y' )
{
                    system("cls");
                    printf("=== Search Student Records in the Database ===");
                    printf("\n\n");
    printf("Enter Student ID       : ");
scanf("%s",&student_id);
printf("\n");
rewind (fp) ;
while ( fread( &info, recsize, 1, fp ) == 1 )
{
if (strcmp(info.stud_id,student_id) == 0 )
{
                            printf("\n");
                            printf("\n ID Number           : %s",info.stud_id);
                            printf("\n Name                : %s",info.name);
                            printf("\n Course              : %s",info.course);
                            printf("\n Gender              : %c",info.sex);
                            printf("\n Age                 : %d",info.age);
                            printf("\n Home Address        : %s",info.address);
                            printf("\n Email Address       : %s",info.email);
                            printf("\n Subject             : %s",info.subject);
                            printf("\n Prelim Grade        : %2.0f",info.prelim);
                            printf("\n Midterm Grade       : %2.0f",info.midterm);
                            printf("\n Endterm Grade       : %2.0f",info.endterm);
                            printf("\n");
                            info.final_grade = (info.prelim * 0.20) + (info.midterm * 0.30) + (info.endterm * 0.50);
                            printf("\n Final Grade         : %2.0f",info.final_grade);
                            printf("\n\n");
                            system("pause");
                            break;
                }
}

            if (strcmp(info.stud_id,student_id) != 0 )
                    {
                        printf("\n\n");
                        printf("No Record in the Database.");
                        printf("\n\n");
                        system("pause");
                        break;
                    }
                    printf("\n\n");
printf ( "\n Search Another Student Record (Y/N) : " ) ;
fflush (stdin) ;
another = toupper(getche());
}
break ;

case '5' :
another = 'Y' ;
while ( another == 'Y' )
{
system("cls");
flag=0;
                    printf("=== Delete Student Records in the Database ===");
                    printf("\n\n");
printf("Enter Student ID       : ");
scanf("%s",&student_id);
printf("\n");

    ft = fopen ("TEMP.DAT", "wb") ;
rewind (fp) ;
while (fread (&info, recsize, 1, fp) == 1 )
{
if (strcmp(info.stud_id, student_id) != 0 )
fwrite(&info, recsize, 1, ft ) ;
else
                            flag=1;
}

fclose (fp) ;
fclose (ft) ;
remove ("BIODATA.DAT") ;
rename ("TEMP.DAT", "BIODATA.DAT") ;
fp = fopen ("BIODATA.DAT", "rb+") ;

                  if(flag==1) {
                        printf("\n\n");
                        printf("Record Successfully Deleted From the Database.");
                        printf("\n\n");
                        system("pause");
                    }

else if (flag!=1) {
                        printf("\n\n");
                        printf("Sorry Record Not Found in the Database.");
                        printf("\n\n");
                        system("pause");

                    }

                        printf("\n\n");
                        printf( "Delete Another Record (Y/N) " ) ;
                        fflush ( stdin ) ;
                        another = toupper(getche());
}
break ;

case '6' :
fclose (fp) ;
printf("\n\n");
/* textcolor(YELLOW+BLINK); */
printf("             Thank You For Using This Program !!!   ");
printf("\n\n");
system("PAUSE");
exit(0);
}
}
} /* End of Code */




Friday, December 21, 2018

Employee's Contact System in Android and SQLite

In this article I would like to share with you a code that I wrote using JavaSE and SQLITE in Android operating system to perform basic CRUD operations. I hope you will find my work useful.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com







Sample Program Output






Thursday, December 13, 2018

Swap Two Numbers in Go

In this simple program it will ask the user to give two numbers and then the program will swap or rearrange the numbers based on the two given numbers by the user using Go programming language.


I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com




Sample Program Output


Program Listing


// swap.go

package main

import "fmt"

func main() {

var val1,val2,temp int32

fmt.Print("\n")
fmt.Print("\tSwap Two Numbers")
fmt.Print("\n\n")
fmt.Print("\tEnter first value   : ")
fmt.Scanf("%d\n",&val1)
fmt.Print("\tEnter second value  : ")
fmt.Scanf("%d\n",&val2)
fmt.Print("\n\n")
fmt.Print("\t===== BEFORE SWAPPING ===== ")
fmt.Print("\n\n")
fmt.Print("\tA = ",val1," and B = ",val2)
fmt.Print("\n\n")
 
 temp = val1;
 val1 = val2;
 val2 = temp; 

fmt.Print("\t===== AFTER SWAPPING ===== ")
fmt.Print("\n\n")
fmt.Print("\tA = ",val1," and B = ",val2)
fmt.Print("\n\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}




Product and Difference of Two Numbers in Go

A program that I wrote in Go Programming that will ask the user to give two numbers and then the program will solve for the product and difference of the two number being provided by the user and display the result on the screen.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com




Sample Program Output



Program Listing

// product_diff.go


package main

import "fmt"

func main() {

var val1 int32
var val2 int32
var product int32
var difference int32

fmt.Print("\n")
fmt.Print("\tProduct and Difference of Two Numbers")
fmt.Print("\n\n")
fmt.Print("\tEnter first value   : ")
fmt.Scanf("%d\n",&val1)
fmt.Print("\tEnter second value  : ")
fmt.Scanf("%d\n",&val2)

product =(val1 * val2);
difference = (val1 - val2)

fmt.Print("\n")
fmt.Printf("\t===== DISPLAY RESULT =====");
fmt.Print("\n\n")
fmt.Println("\tThe product of",val1, "and",val2 ,"is",product,".")
fmt.Print("\n")
fmt.Println("\tThe difference between",val1, "and",val2 ,"is",difference,".")
fmt.Print("\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}




Addition of Two Numbers With Do you want to Continue in Go

A very simple program that I wrote in Go programming language to ask the user to give two numbers and then the program will compute the sum of the two numbers. After which the program will ask the user if the user would like to continue using the program or not.

I am currently accepting programming work, it projects, school 


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.

My personal website is http://www.jakerpomperada.com



Program Listing

package main

import (
"fmt"
"strings"
)
var val1 int32
var val2 int32
var sum int32

func start() {
fmt.Print("\n")
fmt.Print("\tAddition of Two Numbers")
fmt.Print("\n\n")
fmt.Print("\tEnter two numbers: ")
fmt.Scan(&val1,&val2)
sum = (val1+val2)
fmt.Print("\n")
fmt.Println("\tThe sum of",val1, "and",val2 ,"is",sum,".")
fmt.Print("\n")
isConfirmed := Ask4confirm()
if isConfirmed {
  start()
} else
{
 
}
}

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" || s == "yes" {
start()
} else {
fmt.Print("\n")
fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}
return false
}

func main() {
    start()

}

Tuesday, December 11, 2018

Meter To Feet Converter in Go

A simple program that will ask the user a value in meter and then the program will convert it into feet equivalent and display the result on the screen.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com





Sample Program Output


Program Listing

// meter_feet.go

package main

import "fmt"
      
func main(){
    var meter,feet float32
         
    fmt.Print("\n\n")
    fmt.Print("\tMeter To Feet Converter")
    fmt.Print("\n\n")
    fmt.Print("\tGive value in meter : ")
    fmt.Scan(&meter)
    feet = (3.2808399 * meter);
    fmt.Print("\n\n")
    fmt.Printf("\t%0.2f ",meter)
    fmt.Print("Meter(s) is equivalent to ")
    fmt.Printf("%0.2f ",feet) 
    fmt.Print("Feet(s).")
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}

    


Average and Percentage of Five Subjects Solver in Go

A very simple program that will ask the student to give five grades on the following subjects English, Physics, Chemistry, Mathematics, and Computer.  The program will solve the total marks, average marks, and percentage of the five subject grades being given by the student and display the result on the screen.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing


// average.go

package main

import "fmt"
      
func main(){
    var eng, phy, chem, math, comp float32
    var total, average, percentage float32
         
    fmt.Print("\n\n")
    fmt.Print("\tAverage and Percentage of Five Subjects Solver")
    fmt.Print("\n\n")
    fmt.Print("\tEnter Marks of Five Subjects : ")
    fmt.Scan(&eng,&phy,&chem,&math,&comp)
   
/* Calculate total, average and percentage */
    total = eng + phy + chem + math + comp;
    average = total / 5.0;
    percentage = (total / 500.0) * 100;

    fmt.Print("\n\n")
    
    fmt.Print("\tTotal Marks = ")
    fmt.Printf("\t%0.2f ",total)
    fmt.Print("\n")
    fmt.Print("\tAverage Marks = ")
    fmt.Printf("%0.2f ",average) 
    fmt.Print("\n\n")
    fmt.Print("\tPercentage = ")
    fmt.Printf("%0.2f",percentage) 
    fmt.Print("%") 
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}

    

   



Odd and Even Number Checker in Golang

A very simple  program that will ask the user to give a number and then the program will check if the given number is a even or odd number and then display the results on the screen.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com




Sample Program Output


Program Listing

// odd_even.go

package main

import "fmt"

func main(){
    var num_value int32
    fmt.Print("\n")
    fmt.Print("\tOdd and Even Number Checker")
    fmt.Print("\n\n")
    fmt.Print("\tKindly give a number? ")
    fmt.Scanln(&num_value)
  if num_value % 2 ==0 {
       fmt.Print("\n")
       fmt.Print("\tThe given number ")
       fmt.Printf("%d",num_value)
       fmt.Print(" is an Even Number.")
    } else {
       fmt.Print("\n")
       fmt.Print("\tThe given number ")
       fmt.Printf("%d",num_value)
       fmt.Print(" is an Odd Number.")
    }
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}



Legal Age Checker in Go

A very simple program that will ask the user to give its age and then the program will check and determine if the given age of the user is already an adult or still a minor using Go programming language.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing


// legal_age.go

package main

import "fmt"

func main(){
    var age int32
    fmt.Print("\n")
    fmt.Print("\tLegal Age Checker")
    fmt.Print("\n\n")
    fmt.Print("\tWhat is your Age? ")
    fmt.Scanln(&age)
  if age >= 18 {
       fmt.Print("\n")
       fmt.Print("\tAt the age of ")
       fmt.Printf("%d ",age)
       fmt.Print(" years old. You are already an Adult.")
    } else {
        fmt.Print("\n")
        fmt.Print("\tAt the age of ")
        fmt.Printf("%d ",age)
        fmt.Print(" years old. You are still a Minor.")
    }
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}



Positive and Number Number Checker in Golang

A very simple  program that will ask the user to give a number and then the program will check if the given number is a positive or negative number and then display the results on the screen.

I am currently accepting programming work, it projects, school 

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.

My personal website is http://www.jakerpomperada.com




Sample Program Output


Program Listing

// positive_negative.go

package main
 
import "fmt"
 
func main(){
    var num_value int32
    fmt.Print("\n")
    fmt.Print("\tPositive and Number Number Checker")
    fmt.Print("\n\n")
    fmt.Print("\tKindly give a number? ")
    fmt.Scanln(&num_value)
  if num_value <0 {
       fmt.Print("\n")
       fmt.Print("\tThe given number ")
       fmt.Printf("%d",num_value)
       fmt.Print(" is a Negative Number.")
    } else {
       fmt.Print("\n")
       fmt.Print("\tThe given number ")
       fmt.Printf("%d",num_value)
       fmt.Print(" is a Positive Number.")
    }
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n")
}