Saturday, October 29, 2016

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







Array Input and Output in C#

Here is a short and simple program that I wrote in C# that will show you how to use one dimensional array. In this program it will ask the user to give five numbers. The five given number by our user will display at the screen using one dimensional array as our data structu

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 array_input_output
{
    class array_input_output
    {
        static void Main(string[] args)
        {
            int[] rollno = new int[6];
            Console.Write("Array Input and Output in C#");
            Console.Write("\n\n");
           
            for (int s = 1; s <=5 ; s++)
            {
                Console.Write("Enter value in item no. {0} : ", s);
               rollno[s] = Convert.ToInt32(Console.ReadLine());
             }
            Console.Write("\n\n");
            Console.Write("The List of Items Values ");
            Console.Write("\n\n");
            for (int j = 1; j <= 5; j++)
            {
                Console.Write(" {0} ", rollno[j]);
            }
            Console.Write("\n\n");
            Console.Write(" End of Program ");
            Console.ReadLine();
        }
    }
}




Monday, October 24, 2016

Prime Number Checker in C#

Here is a very simple program that I wrote using C# programming language that will ask the user to give a positive number and then our program will check and determine if the given number by the user is a prime number or not. The code is very short and easy to understand.

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 prime_number
{
    class prime_number
    {
        static void Main(string[] args)
        {
            string reply;
            int n = 0;
            int num_value = 0;
            int i=0, flag = 0;

            do
            {
                Console.Clear();
                Console.Write("Prime Number Checker ");
                Console.Write("\n\n");
                Console.Write("Enter a Positive Number : ");
                num_value = Convert.ToInt32(Console.ReadLine());

                for (i = 2; i <= num_value / 2; ++i)
                {
                    // Condition in checking non prime numbers
                    if (num_value % i == 0)
                    {
                        flag = 1;
                        break;
                    }
                }

                if (flag == 0)
                {
                    Console.Write("\n\n");
                    Console.Write("{0} is a Prime Number.", num_value);
                }
                else
                {
                    Console.Write("\n\n");
                    Console.Write("{0} is Not a Prime Number.", num_value);
                }
    
                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");
                    break;
                }

            } while (n == 0);
            Console.ReadLine();
        }
    }
}



Days of the Week Using C#

In this article I would like to share with you a sample program that will ask the user to give a number between 1 to 7 and then our program will check if the given number by the user what day it belongs to. For example the user give 1 it will fall on Monday as day of the week. The code demonstrate how to use switch statement 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.




Sample Program Output

Program Listing


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

// Print day of the week using switch statement

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int days = 0;

            Console.Clear();
            Console.Write("\n\n");
            Console.Write("Days of the Week Program ");
            Console.Write("\n\n");
            Console.Write("Give the number between 1 to 7 :  ");
            days = Convert.ToInt32(Console.ReadLine());
            Console.Write("\n\n");
                    
            switch (days)
            {

                case 1: Console.Write("The day you have selected in Sunday.");
                        break;

                case 2: Console.Write("The day you have selected in Monday.");
                        break;

                case 3: Console.Write("The day you have selected in Tuesday.");
                        break;

                case 4: Console.Write("The day you have selected in Wednesday.");
                        break;

                case 5: Console.Write("The day you have selected in Thursday.");
                        break;

                case 6: Console.Write("The day you have selected in Friday.");
                        break;

                case 7: Console.Write("The day you have selected in Saturday.");
                        break;

               default: Console.Write("Invalid Day. Please Try Again.");
                        break;
             }
            Console.Write("\n\n");
            Console.Write("End of Program.");
            Console.Write("\n\n");
            Console.ReadLine();
        }
    }
}

Thursday, October 20, 2016

Resume Maker in C++

A very simple program that I wrote before in C++ to create a simple resume when I started learning C++ programming. It uses text file to store information give by our user. I hope you will find my work useful.

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 <fstream>

using namespace std;

main() {
     string name,course, school, position;
     int age=0;

     cout << " ======= Resume Maker Version 1.0 =============";
     cout << "\n\n";

     cout << "Enter the name of the Person : ";
     getline(cin,name);
     cout << "Enter the age of the Person : ";

     cin >> age;

     cout << "Enter the course of the Person : ";
    cin.ignore(80,'\n');
    getline(cin,course);

     cout << "Enter the school Graduated  : ";
     getline(cin,school);
     cout << "Enter the Position Applying : ";
     getline(cin,position);

     cout << "\n\n";
     cout << "\t  RECORDS HAS BEEN SAVED IN THE DATABASE";

    ofstream my_file("resume.txt");
    my_file << "\n\n\t\t ==== RESUME VITAE ==== ";
    my_file << "\n\n";
    my_file << "\n \t Name      :  " <<name;
    my_file << "\n \t Age       :  " <<age;
    my_file << "\n \t Course    :  " <<course;
    my_file << "\n \t School    :  " <<school;
    my_file << "\n \t Position  :  " <<position;

    my_file.close();
    return 0;
}