Thursday, November 28, 2019

Opening a Text File Using C++

A simple program using C++ to open a text file.

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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.


Program Listing

#include <fstream>
#include <iostream>
#include <string>

using namespace std;

int main()
{
  string str;  
  ifstream in_file;
  in_file.open("file.txt");

  if( in_file.is_open() )
  {
      in_file>>str;    //read 1 string
      cout<<str<<endl; 
  }
  else
  {
      cout<<"file not found\n";
  }
  system("pause");
  return 0;
}


Do While Loop in C++

A simple program to demonstrate the use of do-while statement in C++.

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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.


Program Listing

#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
   int num = 1;  

   do
   {
      cout<<num<<endl;
      num++;  
   }
   while(num <= 10);   
 
   system("PAUSE");
   return 0;
}

While Loop in C++

A simple program to demonstrate the use of while loop statement in C++.

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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.


Program Listing

#include<iostream>
#include<cstdlib>

using namespace std;

int main()
{
   int num = 1;  

   //
   while(num <= 5)
   {
      cout<<num<<endl;
      num++;  
   }   
 
   system("PAUSE");
   return 0;
}


Introduction To Computer Programming

Wednesday, November 27, 2019

Roman To Decimal Converter in Visual Basic NET

I wrote this program to ask the user to give a value in roman numerals and then the program will convert from roman numerals into decimal equivalent using Microsoft Visual Basic NET as my 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 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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.





Sample Program Output


Program Listing

Public Class Form1

    Private Enum RomanDigit
        I = 1
        V = 5
        X = 10
        L = 50
        C = 100
        D = 500
        M = 1000
    End Enum

    Public Shared Function RomanToNumbers(ByVal roman As String) As Integer
        roman = roman.ToUpper().Trim()
        If roman = "N" Then
            Return 0
        End If

        Dim ptr As Integer = 0
        Dim values As New ArrayList()
        Dim maxDigit As Integer = 1000
        While ptr < roman.Length
            Dim numeral As Char = roman(ptr)
            Dim digit As Integer = CInt([Enum].Parse(GetType(RomanDigit), numeral.ToString()))

            Dim nextDigit As Integer = 0
            If ptr < roman.Length - 1 Then
                Dim nextNumeral As Char = roman(ptr + 1)
                nextDigit = CInt([Enum].Parse(GetType(RomanDigit), nextNumeral.ToString()))

                If nextDigit > digit Then
                    maxDigit = digit - 1
                    digit = nextDigit - digit
                    ptr += 1
                End If
            End If

            values.Add(digit)
            ptr += 1
        End While

        Dim total As Integer = 0
        For Each digit As Integer In values
            total += digit
        Next

        Return total
    End Function


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If MsgBox("Are you sure you want to quit?", MsgBoxStyle.YesNo Or MsgBoxStyle.DefaultButton2, "Close application") = Windows.Forms.DialogResult.Yes Then
            Me.Close()
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim display As Double

        display = RomanToNumbers(TextBox1.Text)
        MsgBox("The Decimal Equivalent is " & display & ".", vbInformation, "The Result")
        TextBox1.Text = ""
        TextBox1.Focus()
    End Sub
End Class


Binary To Decimal Converter In Visual Basic NET

I wrote this program to ask the user to give a value in Binary and then the program will convert the binary number into decimal equivalent using Microsoft Visual Basic NET.

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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.




Sample Program Output


Program Listing


Public Class Form1

    Public Function Bin_To_Dec(ByVal Bin As String)
        Dim dec As Double = Nothing
        Dim length As Integer = Len(Bin)
        Dim temp As Integer = Nothing
        Dim x As Integer = Nothing

        For x = 1 To length
            temp = Val(Mid(Bin, length, 1))
            length = length - 1
            If temp <> "0" Then
                dec += (2 ^ (x - 1))
            End If
        Next

        Return dec
    End Function

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If MsgBox("Are you sure you want to quit?", MsgBoxStyle.YesNo Or MsgBoxStyle.DefaultButton2, "Close application") = Windows.Forms.DialogResult.Yes Then
            Me.Close()
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim display As Double
        display = Bin_To_Dec(Val(TextBox1.Text))

        MsgBox("The Decimal Equivalent is " & display & ".", vbInformation, "The Result")
        TextBox1.Text = ""
        TextBox1.Focus()
    End Sub
End Class




Binary Search Tree Using One Dimensional Array in C

A program to show how to write a binary search tree using a one-dimensional array 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 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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.


Program Listing

#include <stdio.h>
#include <conio.h>
#include <alloc.h>

struct node
{
struct node *left ;
char data ;
struct node *right ;
} ;

struct node * buildtree ( int ) ;
void inorder ( struct node * ) ;

char arr[ ] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', '\0', '\0', 'H' } ;
int   lc[ ] = {  1,   3,   5,   -1,   9,  -1,  -1,   -1,   -1,  -1 } ;
int   rc[ ] = {  2,   4,   6,   -1,  -1,  -1,  -1,   -1,   -1,  -1 } ;

void main( )
{
struct node *root ;

root = buildtree ( 0 ) ;
printf ( “In-order Traversal:\n” ) ;
inorder ( root ) ;

getch( ) ;
}

struct node * buildtree ( int index )
{
struct node *temp = NULL ;
if ( index != -1 )
{
temp = ( struct node * ) malloc ( sizeof ( struct node ) ) ;
temp -> left = buildtree ( lc[index] ) ;
temp -> data = arr[index] ;
temp -> right = buildtree ( rc[index] ) ;
}
return temp ;
}

void inorder ( struct node *root )
{
if ( root != NULL )
{
inorder ( root -> left ) ;
printf ( "%c\t", root -> data ) ;
inorder ( root -> right ) ;
}
}

Tuesday, November 26, 2019

Bacolod Software Inc. Employee's Information System in C++

I simple employees information system that I wrote a long time ago using C++ as my 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 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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.


Program Listing

#include <iostream>
#include <iomanip>

using namespace std;


int main() {
string full_name;
string position;
int age=0;
float wage=0.00;
double yearly_salary=0.00;
char gender;
cout << "\n\n";
cout << "\t Bacolod Software Inc. Employee's Information System"; 
cout << "\n\n";
cout << "\t Give Employee's Name             : ";
getline(cin,full_name);
cin.ignore();
cout << "\t Give Employee's Age              : ";
cin >> age;
cin.ignore();
cout << "\t Give Employee's Position         : ";
getline(cin,position);
cin.ignore();
cout << "\t What is Employee's Wage          : ";
cin >> wage;
cout << "\t What is Employee's Yearly Salary : ";
cin >> yearly_salary;
cin.ignore();
    cout << "\t What is Employee's Gender        : ";
cin >> gender;
cout << setprecision(2);
cout << fixed << showpoint;
cout << "\n\n";
cout << "\t ===== DISPLAY RESULT =====";
cout << "\n\n";
cout << "\t Employee's Name          : "      << full_name <<".\n";
cout << "\t Employee's Age           : "     <<  age <<".\n";
cout << "\t Employee's Position      : "     << position <<".\n";
cout << "\t Employee's Wage          : PHP " <<  wage <<".\n";
cout << "\t Employee's Yearly Salary : PHP " << yearly_salary <<".\n";
cout << "\t Employee's Gender        : "     <<  gender <<".\n";
cout << "\n\n";
cout << "\t ===== END OF PROGRAM =====";
cout << "\n\n";
return 0;
}

Monday, November 25, 2019

Power of a Number Using Recursion in C

I wrote this simple program to ask the user to give a number and then the program will solve the power of the number based on the based and exponent values given by our user 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 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 City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.




Sample Program Output


Program Listing

power.c

#include <stdio.h>

long int Solve_Power(int b,int p)
{
    long int result=1;
    if(p==0) return result;
    result=b*(Solve_Power(b,p-1)); 
}

int main()
{
    int base=0,power=0;
    long int result=0;
    
    printf("\n\n");
    printf("\tPower of a Number Using Recursion in C");
    printf("\n\n");
    printf("\tEnter value of base: ");
    scanf("%d",&base);
     
    printf("\tEnter value of power: ");
    scanf("%d",&power);
     
    result=Solve_Power(base,power);
    
     printf("\n\n");
    printf("\t%d to the power of %d is: %ld\n",base,power,result);
     
    printf("\n\n");
printf("\tEnd of Program");
printf("\n");
}