Saturday, April 10, 2021

General Average Grade Solver With Remarks in C++

General Average Grade Solver With Remarks in C++

 A simple program to compute the average grade of the student with remarks that I wrote using C++ programming language.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com








Program Listing


// general_average.cpp

// Author  : Jake Rodriguez Pomperada,MAED-IT, MIT

// Website : www.jakerpomperada.com / www.jakerpomperada.blogspot.com

// Date   : April 10, 2021   Saturday  9:30 AM

// Email  : jakerpomperada@gmail.com


#include <iostream>

#include <string.h>


using namespace std;


// Prelim - 0.20, Midterm - 0.30, Finals = 0.50


int main() 

{

 int prelim=0, midterm=0,finals=0;

 int solve_grade;

 

 char subject[100];


    cout <<"\n\n";

 cout <<"\tGeneral Average Grade Solver With Remarks in C++";

 cout <<"\n\n";

 cout <<"\tSubject Name : ";

 gets(subject);

 

 cout <<"\tEnter Prelim Grade : ";

 cin >> prelim;

 cout <<"\tEnter Midterm Grade : ";

 cin >> midterm;

 cout <<"\tEnter Final Grade : ";

 cin >> finals;

 

 solve_grade = (prelim * 0.2) +

               (midterm * 0.3) +

      (finals * 0.5);   

 

 

 cout <<"\n\n";

 cout << "\tSubject : " << subject;

 cout <<"\n\n";

 cout <<"\tYou general average grade is "

     << solve_grade <<".";

cout << "\n\n\n";


if (solve_grade >= 75) {

cout << "\tYou Passed the Subject this semester.";

} else {

cout << "\tYou Failed the Subject this semester.";

}

 cout <<"\n\n";

 cout <<"\tEnd of the Program";

}



Simple Inventory System in PHP

Simple Inventory System in PHP

 Here is a simple inventory system in PHP that I wrote I hope you will like it.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com









DOWNLOAD THE FREE AND COMPLETE SOURCE CODE HERE

Thursday, April 8, 2021

Saving a Text in a Text File in C++

Saving a Text in a Text File in C++

 A simple program that I wrote in C++ to save a text file I hope you will find my work useful.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com



Program Listing

#include <iostream>

#include <fstream>



using namespace std;



main() {


    ofstream myfile("test.txt");

    myfile << "Saving a Text in a Text File in C++";

    myfile.close();

}



Wednesday, April 7, 2021

Quick Sort in C++

Quick Sort in C++

 A simple program quick sort in C++ program that I wrote while I am learning C++ programming.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com





Program Listing

// quick_sort.cpp

// Prof. Jake R. Pomperada, MAED-IT, MIT

// www.jakerpomperada.com / www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines


#include <iostream>

#include <cstdlib>

 

using namespace std;


void swap_numbers(int *a, int *b)

{

int temp; 

temp = *a;

*a = *b;

*b = temp;

}

 


int Partition(int a[], int low, int high)

{

int pivot, index, i;

index = low;

pivot = high;

 


for(i=low; i < high; i++)

{

if(a[i] < a[pivot])

{

swap_numbers(&a[i], &a[index]);

index++;

}

}


swap_numbers(&a[pivot], &a[index]);

 

return index;

}

 


int RandomPivotPartition(int a[], int low, int high)

{

int pvt, n, temp;

n = rand();


pvt = low + n%(high-low+1);

 


swap_numbers(&a[high], &a[pvt]);

 

return Partition(a, low, high);

}

 


int QuickSort(int a[], int low, int high)

{

int pindex;

if(low < high)

{


pindex = RandomPivotPartition(a, low, high);


QuickSort(a, low, pindex-1);

QuickSort(a, pindex+1, high);

}

return 0;

}

 

int main()

{

int n=0, i=0;

cout <<"\n";

cout <<"\t\tQuick Sort in C++";

cout <<"\n\n";

cout<<"\tHow many items to be sorted? ";

cin>>n;

 

int arr[n];

for(i = 0; i < n; i++)

{

cout<<"\tEnter item no. "<<i+1<<": ";

cin>>arr[i];

}

    cout <<"\n";

  cout<<"\tUnSorted Items\n ";

cout <<"\n";

cout <<"\t";

for (i =0; i < n; i++) {

cout<<" ,"<<arr[i];

}

    cout <<"\n";

QuickSort(arr, 0, n-1);

    cout <<"\n\n";

cout<<"\tSorted Item \n";

cout <<"\n";

cout <<"\t";

for (i = 0; i < n; i++) {

cout<<" ,"<<arr[i];

}

    cout <<"\n\n";

cout <<"\tEnd of Program";   

cout <<"\n";

}



Tuesday, April 6, 2021

Asterisk Triangle in Java

Asterisk Triangle in Java

 A simple program that will ask the user to give a number and then the program will generate the asterisk triangle using Java programming language.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com



Program Listing

/* Asterisk.java

 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT

 * April 5, 2021   8:13 PM

 * www.jakerpomperada.blogspot.com

 * www.jakerpomperada.com

 * jakerpomperada@gmail.com

 * Bacolod City, Negros Occidental

 */ 


import java.util.Scanner;


public class Asterisks {

public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        

        System.out.println();

        System.out.print("\tAsterisk Triangle in Java");

        System.out.println("\n");

        System.out.print("\tEnter a number: ");

        int number = scan.nextInt();

        int res;

        System.out.println("\n");

        for (int a=1; a<=number; a++) {

        System.out.print("\t");

            res = number - a;

            for (int b=0; b<=res;b++) {

                System.out.print("*");

            }

            System.out.println("");

        }

    }

}


Money Denomination Checker in Perl

Money Denomination Checker in Perl

Money Denomination Checker in PERL

Machine Problem

Create and design a program that will ask the amount from the user and then our program will count how many one thousand, five hundred, two hundred,  one hundred, fifty and twenty bills based here in the Philippine currency.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com






 Program Listing


# bills.pl
# Author       :  Jake Rodriguez Pomperada,MAED-IT,MIT
# Date         :  November 9, 2019   7:33 AM  Saturday
# Location     :  Bacolod City, Negros Occidental
# Tools        :  Perl  5 and Visual Studio Code Version 1.37.0
# Websites     :  www.jakerpomperada.com  
#                 www.jakerpomperada.blogspot.com
# Email        :  jakerpomperada@gmail.com

print "\n\n";
print "\tMoney Denomination Checker in PERL";
print "\n\n";
print "\tGive the amount of money : PHP  ";
chomp($amt  =<>);

  # Conversion start here 

 $thousand = int($amt/1000);
 $amt =  int($amt%1000);
 $five_hund = int($amt/500);
 $amt = int($amt%500);
 $two_hundreds =int($amt/200);
 $amt = int($amt%200);
 $hundreds = int($amt/100);
 $amt = int($amt%100);
 $fifty = int($amt/50);
 $amt = int($amt%50);
 $twentys = int($amt/20);
 $amt = int($amt%20);

print "\n";
print "\t===== DISPLAY RESULT =====";
print  "\n\n";
print  "\tNumber of  PHP 1000 Pesos notes   :  $thousand\n";
print  "\tNumber of  PHP 500 Pesos notes    :  $five_hund \n";
print  "\tNumber of  PHP 200 Pesos notes    :  $two_hundreds\n";
print  "\tNumber of  PHP 100 Pesos notes    :  $hundreds\n";
print  "\tNumber of  PHP  50 Pesos notes    :  $fifty\n";
print  "\tNumber of  PHP  20 Pesos notes    :  $twentys";
print "\n\n";
print "\tEnd of Program";
print "\n";


Sum and Product of Two Numbers in PERL

Sum and Product of Two Numbers in PERL

 Machine Problem

Create and design a program that will ask the user to give two numbers and then the program will compute the sum and product of the given numbers 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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com





Program Listing


# sum_product.pl
# Author      :  Jake Rodriguez Pomperada,MAED-IT,MIT
# Date        :  November 5, 2019  Tuesday  9:49 AM
# Location    :  Bacolod City, Negros Occidental
# Email       :  jakerpomperada@gmail.com
# Websites    :  www.jakerpomperada.com  
#                www.jakerpomperada.blogspot.com

print "\n\n";
print "\tSum and Product of Two Numbers in PERL";
print "\n\n";
print "\tEnter First Value  : ";
chomp($a  =<>);
print "\tEnter Second Value  : ";
chomp($b =<>);

# Compute the sum and product
   $sum = ($a+$b);
   $product = ($a*$b);

print "\n\n";
print "\tThe sum of $a and $b is $sum.";
print "\n\n";
printf "\tThe product of $a and $b is $product.";
print "\n\n";
print "\tEnd of Program";


 


Monday, April 5, 2021

Decimal To Roman Numeral in C++

Password in C++

Decimal To Roman Numeral in C++

 A simple program that will ask the user to give a number in decimal and convert it into Roman Numeral Equivalent using C++ programming language.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com







Program Listing

// roman.cpp

// Prof. Jake R. Pomperada, MAED-IT,MIT

// www.jakerpomperada.com / www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines



#include <iostream>

#include <string>


using namespace std;


string decimal_to_roman(int x) {

    int dec[13] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};

    string num[13] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"};

    string numeral;

    for(int i = 0; i < 13; i++) {

        while (x >= dec[i]) {

            x -= dec[i];

            numeral.append(num[i]);

        }

    }

    return numeral;

}

int main() {

    int decimal=0;

    

    cout <<"\n\n";

    cout <<"\tDecimal To Roman Numeral in C++";

    cout <<"\n\n";

    cout << "\tGive a Number : ";

    cin >> decimal;

    cout << "\n";

    cout << "\tThe given number is " << decimal;

    cout << "\n";

cout << "\tThe Roman Numeral Value is "<< decimal_to_roman(decimal);

cout << "\n\n";

    cout <<"\tEnd of Program";

    }



Password in C++

A simple password program that I wrote in the C++ programming language.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com





Program Listing

password.cpp


// password.cpp

// Prof. Jake R. Pomperada, MAED-IT,MIT

// www.jakerpomperada.com / www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines


#include <iostream>

#include <string>


using namespace std;


int main()

{


    string password = "123";

    string passwordEntry;

    int attempts = 0;


    cout <<"\n\n" ;

    cout << "\tPassword in C++\n\n";

    cout << "\tPlease enter your password: ";

    getline(cin, passwordEntry, '\n');


    while ( passwordEntry != password && attempts <=2 )

    {

        cout << "\n";

        cout <<"\tPassword Attempt No. : " <<attempts+1;

        cout << "\n";

        cout << "\tEnter Password Again : ";

        getline(cin, passwordEntry, '\n');

        attempts++;

    }


    if ( passwordEntry == password && attempts <=3 )

    {

        cout << "\n";

        cout << "\tAccess Granted in the System.";

    }

    else

    {

        cout << "\n";

        cout << "\tSorry, you are only allowed 3 password login attempts.";

        cout << "\n\n";

    }


}