Friday, November 4, 2016

Student Grade Solver Using Two Dimensional Array in C++

Here is a simple program that I wrote using C++ that will compute and evaluate the grades of the students using two dimensional array in C++ as our data structure. I hope you will find my work useful I am using Dev C++ as my C++ compiler and CodeBlocks as my C++ text editor in writing this program. Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.



Program Listing

#include <iostream>
#include <iomanip>

using namespace std;

main() {
     int grades[5][1],pass=0,failed=0,out_range=0;
     int row=0, col=0;
     string remarks;
     char letter_grade;

     cout << "\t Grades Evaluator Version 1.0";
     cout << "\n\n Created By: Mr. Jake Rodriguez Pomperada,MAED-IT";
     cout << "\n\n";
     
     for ( row=0; row < 5; row++) {
       for  (col=0; col < 1; col++) {
         cout << "Enter grade : " ;
         cin >> grades[row][col];
     }
}
    
  // Code to check for remarks
cout <<"\n" << setw(5) << "GRADES" <<
               setw(7) << " EQUIV " <<
               setw(10) << "REMARKS";
    cout << "\n\n";

     for ( row=0; row < 5; row++) {
       for (col=0; col < 1; col++) {

         if (grades[row][col] >= 75) {
             remarks = "PASSED";
             pass++;
         }
         else if (grades[row][col] < 50)
         {
           remarks= " Error Out of Range ";
           out_range++;
         }

         else  if (grades[row][col] < 75){
                 remarks = "FAILED";
                 failed++;
         }
 


  // Letter Grade Equivalent

     if (grades[row][col] >= 90 &&  grades[row][col] <= 100  ) {
           letter_grade = 'A';
         }
         else if (grades[row][col] >= 80 && grades[row][col] <= 89  ) {
           letter_grade = 'B';
         }
         else if (grades[row][col] >= 70 && grades[row][col] <= 79  ) {
           letter_grade = 'C';
         }
         else if (grades[row][col] >= 60 && grades[row][col] <= 69  ) {
           letter_grade = 'D';
         }
        else if (grades[row][col] >= 50 && grades[row][col] <= 59  ) {
           letter_grade = 'F';
         }
        else if (grades[row][col] < 50) {
            letter_grade = 'X';

         }

        cout <<"\n" << setw(5) << grades[row][col]
              << setw(6) << letter_grade << setw(12)
              << remarks;  
     } 
 }
      

     cout << "\n\n";
     cout << "\nNumber of Passed Grades " << pass << ".";
     cout << "\nNumber of Failed Grades " << failed << ".";
     cout << "\nNumber of Out of Range Grades "<< out_range << ".";
     cout << "\n\n";
     system("PAUSE"); 
 
}

Highest and Lowest Numbers Using Two Dimensional Array in C++

This sample program that I wrote a long time ago will ask the user to give a series of numbers and then our program will check which of the given number by our user is the highest and lowest using two dimensional array in C++ programming language. I hope you will find my work useful. Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.


Program Listing

/* Checks Highest and Lowest From 10 numbers*/
// Date Modified : November 29, 2009
// Sunday

// Created By: Mr. Jake Rodriguez Pomperada, MAED-Instructioanl Technology
// Email Address : jakerpomperada@yahoo.com

#include <iostream>
#include <cctype>

using namespace std;

 main()
{
char reply;

do {
int values[5][2],high=0,low=0, sum=0;

cout<<"\n\n";
cout<<"\t\tHighest and Lowest Number Checker 3.0";
cout<<"\n\n\t      Created By: Mr. Jake R. Pomperada,MAED-IT";
cout<<"\n\n";


       for (int row=0; row <5; row++) {
         for ( int col=0; col <2; col++) {
{

cout<<"Enter a value : ";

cin>>values[row] [col];
     sum+=values[row][col];
}
     }

high=values[0][0];
  for (int row=0; row <5; row++) {
         for ( int col=0; col <2; col++) {

if(high<values[row][col])
{
high=values[row][col];
}
}
  }
low=high;

for (int row=0; row <5; row++) {
         for (int col=0; col <2; col++) {

if(low>values[row][col])
{
low=values[row][col];
}
}

     }


} // check for highest value
cout<<"\nThe highest number is = "<<high;
cout<<"\n";
cout<<"The lowest number is = "<<low;
cout<<"\n";
cout<<"The Total Sum of Values is = "<<sum;
cout<<"\n\n";
cout<<"Do You want to Continue y/n :=> ";
cin>>reply;

} while (toupper(reply) == 'Y');
if (toupper(reply)== 'N')
{
      cout << "\n\n";
      cout << "\t Thank You for Using This Program";
      cout << "\n\n";
}
 system("PAUSE");
}

Product Price Solver Using Two Dimensional Array

This simple program will solve the price of a certain product using two dimensional array as our data structure in C++. I hope you will find my work useful in learning C++ programming. Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.


Program Listing

#include <iostream>

using namespace std;

main() {
    string product[4] = {"Nido","Bear Brand",
                       "Anchor Milk", "Milo"};
    int price[4][1];
    int solve=0;
    int add=0,change=0, pay=0;
    cout << "Product Price Solver";
     cout << "\n\n";
     for (int a=0; a<4; a++) {
       for (int b=0; b<1; b++)
       {

        cout << "Enter " <<product[a]
         << " price : ";
        cin >> price[a][b];
        add+=price[a][b];
       }
     solve= add;
     }
    cout << "\n\n";
    cout << "Total Amount Cost :=>" << solve;
    cout << "\n\n";
    cout << "Amount Payed : ";
    cin >> pay;
    change = (pay-solve);
    cout << "Your change is P " << change
        << ".";
    cout << "\n\n";
    system("pause");
 }

Running Sum Using Two Dimensional Array in C++

A very simple program that I wrote using C++ that shows how to use two dimensional array. What the program does it accept a series of number provided by the user and then it sum up the values dynamically. The program code is very easy to understand and very short. I hope you will find my work useful. Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.



Program Listing

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int values[3][2], running_sum=0;
    
     cout << "\t\t RUNNING SUM VERSION 1.0";
     cout << "\n";
     cout << "\tCreated By: Mr. Jake R. Pomperada, MAED-IT"; 
          cout << "\n";
      for (int row=0; row< 3; row++) {
           for (int col=0; col< 2; col++) {

            cout << "\nEnter a Number :=> ";
            cin >> values[row][col];
          
            running_sum+=values[row][col];
            cout << "\nThe running sum is " <<       
                    running_sum << ".";
             }
             }
         cout << "\n\n";                     
    system("PAUSE");
    return EXIT_SUCCESS;
}

Saturday, October 29, 2016

OOP CRUD in PHP and MySQL

A simple object oriented programming CRUD application that I wrote a very long time ago in PHP and MySQL. I hope you will find my work useful. Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.








Sample Program Output




Time Monitoring System System in PHP and MySQL

A very simple time monitoring system in PHP and MySQL that I wrote a long time ago to monitor daily attendance of the employees in the company. 

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.





Multiplication Table in Java

One of my friend and fellow software engineer named Mr. Alfel Benvic G. Go write and share to us his version of multiplication table using Java programming language. He is using NetBeans as his text editor to wrote this program. I am very grateful and thankful because he share his talent with this program.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.





Thursday, October 27, 2016

Summation in C#

Here is a very simple program that I wrote using C# programming language using console application that will ask the user to give a series of numbers and then it will perform summation of values based on the given  number by the user. The code is very short and easy to understand.  Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.


Sample Program Output

Program Listing

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace running_sum
{
    class running_sum
    {
        static void Main(string[] args)
        {
            int[] values = new int[6];
            int sum = 0;
            Console.Write("Running Sum Program");
            Console.Write("\n\n");

            for (int a = 1; a <= 5; a++)
            {
                Console.Write("\n");
                Console.Write("Enter value in item no. {0} : ", a);
                values[a] = Convert.ToInt32(Console.ReadLine());
                sum += values[a];
                Console.Write("\n");
                Console.Write("The running sum of values is {0}.", sum);
                Console.Write("\n");
            }
             
            Console.Write("\n\n");
            Console.Write("End of Program.");
            Console.Write("\n\n");
            Console.ReadLine();
        }
    }
}


Year Level Checker Using Switch Statement in C#

Here is a simple program that I wrote using C# programming language that will ask the user's name and year level using Switch statement in C#. The code is very easy to understand and use.  Thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.






Sample Program Output


Program Listing

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace year_level
{
    class year_level
    {
        static void Main(string[] args)
        {
            int year_level = 0;
            string user;

            Console.Clear();
            Console.Write("\n\n");
            Console.Write("Year Level Checker Using Switch Statement ");
            Console.Write("\n\n");
            Console.Write("What is your name     : ");
            user = Console.ReadLine();
            Console.Write("\n\n");
            Console.Write("Enter Your Year Level : ");
            year_level = Convert.ToInt32(Console.ReadLine());
            Console.Write("\n\n");

            switch (year_level)
            {

                case 1: Console.Write("Hello {0} you are belong to Freshmen. ", user);
                    break;

                case 2: Console.Write("Hello {0} you are belong to Sophomore. ", user);
                    break;

                case 3: Console.Write("Hello {0} you are belong to Juniors. ", user);
                    break;

                case 4: Console.Write("Hello {0} you are belong to Seniors. ", user);
                    break;
             
                default: Console.Write("Invalid Year Level. Please Try Again.");
                    break;
            }
            Console.Write("\n\n");
            Console.Write("End of Program.");
            Console.Write("\n\n");
            Console.ReadLine();
        }
    }
}





Tuesday, October 25, 2016

Civil Status Checker in C#

Hi there in this article I would like to share with you a very simple program that will check the civil status of a person whether the person is single, married, widow, annulled or separated from their spouse. What does the program do is to ask the users name and then it will give a selection of values 1 for single, 2 for married, 3 for widow, 4 - annulled and 5 - separated. If the user invalid value our program will also the user that the value that is being provided is invalid. The purpose of this program is to teach the person understand if else compounded statement in C#. I hope you will find my work useful. Thank you very much.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.







Sample Program Output

Program Listing

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

// Program : Civil Status Checker in C#
// Author  : Mr. Jake R. Pomperada, MAED-IT
// Date    : October 25, 2016  Tuesday


namespace civil_status
{
    class civil_status
    {
        static void Main(string[] args)
        {
            int status = 0;
            string reply;
            int n = 0;
            String user;

            do {
            Console.Clear();
            Console.Write("\n\n");
            Console.Write("\t Civil Status Checker");
            Console.Write("\n\n");
            Console.Write("What is your name : ");
            user = Console.ReadLine();
            Console.Write("\n");
            Console.WriteLine("1 - Single 2 - Married 3 - Widow 4 - Annulled 5 - Separated ");
            Console.Write("\n");
            Console.Write("What is your Civil Status : ");
            status = Convert.ToInt32(Console.ReadLine());
            Console.Write("\n");
                     
            if (status == 1) {
                   Console.Write("\n");
                   Console.Write(" Hi {0} you are still Single. ",user);
                }

            else  if (status == 2) {
                   Console.Write("\n");
                   Console.Write(" Hi {0} you are already Married. ",user);
                }
            else if (status == 3) {
                   Console.Write("\n\n");
                   Console.Write(" Hi {0} you are already Widow. ",user);
                }
            else  if (status == 4) {
                   Console.Write("\n");
                   Console.Write(" Hi {0} you are already Annulled in your marriage.",user);
                }
            else  if (status == 5) {
                   Console.Write("\n\n");
                   Console.Write(" Hi {0} you are already Separated from your Spouse. ",user);
                }
            else {
                   Console.Write("\n");
                   Console.Write(" Hi {0} you are already Separated from your Spouse. ",user);
            }
                 Console.Write("\n\n");
                Console.Write("Do You Want To Continue? Y/N : ");
                reply = Console.ReadLine();

                if (reply == "y" || reply == "Y")
                {
                    continue;
                }
                else if (reply == "n" || reply == "N")
                {
                    Console.Write("\n\n");
                    Console.Write("Thank You For Using This Software.");
                    Console.Write("\n\n");
                    Console.ReadLine();
                    break;
                }
         
           } while (n == 0);
        }
    }
}  // End of Program