Wednesday, August 18, 2021

Lower Case To Upper Case String Conversion in C++

 I simple program that I wrote to accept string from the user in lowercase and convert it into upper case format in 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 at my email address also. Thank you.



My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

// lowercase_uppercase.cpp

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

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines

// Dev C++ Version 5.11


#include <iostream>

#include <string>


using namespace std;


int main()

{

  

    string str;

   

   cout << "\n\n";

   cout << "\tLower Case To Upper Case String Conversion in C++";

   cout << "\n\n";

   cout << "\tEnter a String : ";

   getline(cin,str);

    for (size_t i = 0; i < str.length(); ++i)

    {

        str[i]=toupper(str[i]);

    }


    cout << "\n\n";

    cout<<"\tConverted Results in Upper Case : "  <<str << ".";

    cout << "\n\n";

    cout << "\tEnd of Program";

    cout << "\n\n";

    system("PAUSE");


}


Vowels and Consonants in C

Count Vowels, and Consonants in C

 A simple program that I wrote using C programming language to ask the user to give a string and then the program will count the number of vowels, and consonants 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 at my email address also. Thank you.



My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

/* vowels_consonants.c
 Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
 Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
 Email : jakerpomperada@gmail.com
 Tool  : Dev C++ 5.11
 Location : Bacolod City, Negros Occidental Philippines
*/

#include <stdio.h>
#include <string.h>


int i=0,a=0,vowels=0,consonants=0;
char str[100];

void main()
{
printf("\n\n");
printf("\tCount Vowels, and Consonants in C");
printf("\n");
printf("\nGive a String : ");
    scanf("%s",&str);
     for (i = 0; i < strlen(str); ++i)
    {
        str[i]=toupper(str[i]);
    }
for(i=0;str[i]!='\0';i++)
{
    
  if(str[i]=='A' | str[i]=='E' | str[i]=='I' | str[i]=='O' | str[i]=='U')
{
a++;
vowels++;
printf("\n %d. The Vowels is: %c",a,str[i]);
}
else
{
a++;
consonants++;
printf("\n %d. The Consonants is: %c",a,str[i]);
}
}
    printf("\n");
printf("\n\nThe Total Number of Vowels : %d",vowels);
printf("\nThe Total Number of Consonants  : %d",consonants);
printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
} /* End of Code */



Tuesday, August 17, 2021

Shell Sort in C

Shell Sort Program in C

 A simple shell sort program 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

/* shell_sort.c
   Author   : Mr. Jake Rodriguez Pomperada,MAED-IT, MIT
   Tool     : Dev C++ 5.11
   Date     : August 15, 2021   Sunday  4:29 PM
   Websites  : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
   Email    :jakerpomperada@gmail.com
   Location : Bacolod City, Negros Occidental, Philippines
*/

#include <stdio.h>
#include <stdlib.h>

void shellsort(int arr[], int num);

int main()
{
 int items[1000], num=0,min=0,loc=0;
 int c=0, b=0,change=0,j=0,temp=0;
 system("cls");
 printf("\n\n");
 printf("\tShell Sort Program in C");
 printf("\n\n");
 printf("\tHow many items? : ");
 scanf("%d", &num);
 printf("\n\n");
 for (c= 0; c < num; c++) {
    printf("\tEnter item no. %d: ", c+1);
    scanf("%d", &items[c]);
 }
printf("\n\n");
printf("\tOriginal Arrangement of Numbers");
printf("\n\n");
 for ( c = 0 ; c < num ; c++ ) {
   printf("\t%d ",items[c]);
 }
 shellsort(items, num);
 printf("\n\n");
 printf("\tAsceding Order of Numbers");
 printf("\n\n");
 for ( c = 0 ; c < num ; c++ ) {
 printf("\t%d ", items[c]);
 }  
printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
system("pause");
}

void shellsort(int arr[], int num)
{
    int i, j, k, tmp;
    for (i = num / 2; i > 0; i = i / 2)
    {
        for (j = i; j < num; j++)
        {
            for(k = j - i; k >= 0; k = k - i)
            {
                if (arr[k+i] >= arr[k])
                    break;
                else
                {
                    tmp = arr[k];
                    arr[k] = arr[k+i];
                    arr[k+i] = tmp;
                }
            }
        }
    }
}


Monday, August 16, 2021

Display All Odd and Even Numbers in C++

Display All Odd and Even Numbers in C++

 A simple program that I wrote to display all odd and even numbers using C++ programming languages.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.



Program Listing

// Odd_Even_Numbers.cpp

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

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines

// Dev C++ Version 5.11



#include <iostream>


using namespace std;


int main()

{


//declare variables

    int number=0;

    int n=0;


    cout << "\n\n";

cout << "\tDisplay All Odd and Even Numbers in C++";

cout << "\n\n";

cout << "\tGive a Number : ";

cin >> n;

cout <<"\n";

// print odd numbers

    cout << "\tThe odd numbers are:";

    cout << "\n\n";

    cout << "\t";

    for (number=1; number<=n; number+=2)

    {

        cout << " " << number <<"";

    }


    cout << "\n\n";

// print even numbers

    cout << "\tThe even numbers are:";

    cout << "\n\n";

    cout << "\t";

    for (number=0; number<=n; number+=2)

    {

        cout << " " << number <<"";

    }


cout << "\n\n";

cout << "\tEnd of Program";

cout << "\n\n";

system("pause");

}


Money Bill Denominator in C++

Money Bill Denominator in C++

 A simple money bill denominator 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Program Listing

// money.cpp

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

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines

// Dev C++ Version 5.11


#include <iostream>


using namespace std;


int main()

{

int amt=0,thousand=0,five_hund=0,two_hundreds=0;

int hundreds=0,fifty=0,twentys=0;


cout << "\n\n";

cout << "\tMoney Bill Denominator in C++";

cout << "\n\n";

cout << "\tEnter an Amount : ";

cin >> amt;

thousand = amt/1000;

amt = amt%1000;

five_hund = amt/500;

amt = amt%500;

two_hundreds = amt/200;

amt = amt%200;

hundreds = amt/100;

amt = amt%100;

fifty = amt/50;

amt = amt%50;

twentys = amt/20;

amt = amt%20;


cout << "\n\n";

cout << "\tDisplay Report";

cout << "\n\n";

cout << "\tNumber of PHP 1000  Notes : " << thousand << ".\n";

cout << "\tNumber of PHP 500 Notes  : " << five_hund << ".\n";

cout << "\tNumber of PHP 200 Notes  : " << two_hundreds << ".\n";

cout << "\tNumber of PHP 100 Notes  : " << hundreds << ".\n";

cout << "\tNumber of PHP 50 Notes   : " << fifty << ".\n";

cout << "\tNumber of PHP 20 Notes   : " << twentys << ".\n";

cout << "\n\n";

cout << "\tEnd of Program";

cout << "\n\n";

system("pause");

}


JavaScript Basic Concepts

Friday, August 13, 2021

Fibonacci Series Using Controllers in AngularJS

Fibonacci Series Using Controllers in AngularJS

 A simple program to ask the user to give a number and then the program will compute and display the Fibonacci series using the controller in AngularJS.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : August 13, 2021  9:14 AM Friday

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html>

  <head>

    <title>Fibonacci Series Using Controllers in AngularJS</title>

  <script type="text/javascript" src="angular.min.js"></script>

    <script>

    var myApp=angular.module("myModule",[]);

    myApp.controller("Fibonacci_Series",function($scope) {

    $scope.Fibonacci_Generate=function()

    {

          

       $scope.result = "Fibonacci Series"


      var arr = [];

  

      let n1 = 0, n2 = 1, nextTerm;


    for (let i = 1; i <= $scope.a; i++) {

        arr.push(n1);

        document.getElementById("outputDiv").innerHTML = arr;

        nextTerm = n1 + n2;

        n1 = n2;

        n2 = nextTerm;

    }

        

      }


      $scope.Clear_All=function()

          {

          $scope.a = "";  

          document.getElementById("outputDiv").innerHTML = "";

          $scope.result = "";

               

      }

    

    

  });

     </script>

 </head>

 <style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

 <body ng-app="myModule" ng-controller="Fibonacci_Series">

  <h3>Fibonacci Series Using Controllers in AngularJS

  </h3>

 <div>

  <table border="0">

  <tr>

  <td>

  Give a Positive Number 

  </td>

       <td>

         <input type="number" ng-model="a"/>

       </td>

      <tr>

 

      <tr>

      <td colspan="10">

      <br>

      <input type="button" ng-click="Fibonacci_Generate();"

      value="Generate Fibonacci Series"/>

           <input type="button" ng-click="Clear_All();"

           value="Clear"/>

      </td>

      </tr>

      </table>

     </div>

     

     <p> {{result}} </p> 

      

    <textarea id="outputDiv" name="outputDiv" rows="4" cols="50">


</textarea>

  

    

  </body>

</html>


Thursday, August 12, 2021

Sum of Two Numbers Using Functions in C++

Sum of Two Numbers Using Function in C++

 A simple program to ask the user to give two numbers and then the program will compute the sum of two numbers using function in 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Program Listing

// sum.cpp

// Jake Rodriguez Pomperada, MAED-IT, MIT

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines.


#include <iostream>


int addition(int a, int b);


int main()

{

int a=0,b=0,sum=0;

std::cout <<"\n\n";

std::cout << "\tSum of Two Numbers Using Function in C++";

std::cout <<"\n\n";

std::cout <<"\tGive First Value : ";

std::cin >> a;

std::cout <<"\n";

std::cout <<"\tGive Second Value : ";

std::cin >> b;

std::cout <<"\n";

sum = addition(a,b);

std::cout <<"\n";

std::cout <<"\tThe sum of " << a << " and " 

            << b << " is " << sum <<".";

  std::cout <<"\n\n\n";

  std::cout <<"\tEnd of Program";

  std::cout <<"\n";

}


int addition(int a, int b)

{

 return(a+b);

}


Switch Statement in C++

Switch Statement in C++

 A simple program to demonstrate how to declare and use switch statement 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

// switch.cpp

// Jake Rodriguez Pomperada, MAED-IT, MIT

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines.


#include <iostream>


int main()

{

int a=0;

std::cout <<"\n\n";

std::cout << "\tSwitch Statement in C++";

std::cout <<"\n\n";

std::cout <<"\tGive a Number : ";

std::cin >> a;

std::cout <<"\n";

switch(a) {

case  1 : std::cout <<"\tOne Number";

    break;

case 2 : std::cout <<"\tTwo Number";

    break;

case 3 : std::cout <<"\tThree Number";

    break;

case 4 : std::cout <<"\tFour Number";

    break;

case 5 : std::cout <<"\tFifth Number";

    break;

default : std::cout <<"\tInvalid Number. Try Again.";

      

}

  std::cout <<"\n\n\n";

  std::cout <<"\tEnd of Program";

  std::cout <<"\n";

}


C++ Mahirap Bang Pag-aralan?

Tuesday, August 10, 2021

Bubble Sort in C

Bubble Sort in C

 A simple bubble sort program 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

bubble_sort.c

/* bubble_sort.c

   Author   : Mr. Jake Rodriguez Pomperada,BSCS,MAED-IT

   Tool     : Dev C++ 5.11

   Date     : April 18, 2019  Thursday   7:59 AM

   Website  : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

   Email    : jake_pomperada@tup.edu.ph and jakerpomperada@gmail.com

   Location : Bacolod City, Negros Occidental

*/


#include <stdio.h>

#include <stdlib.h>

int main()

{

 int items[1000], num=0, a=0, b=0, change=0;

 system("cls");

 printf("\n\n");

 printf("\tBubble Sort Program in C");

 printf("\n\n");

 printf("\tHow many items? : ");

 scanf("%d", &num);

 printf("\n\n");

 for (a= 0; a < num; a++) {

 printf("\tEnter item no. %d: ", a+1);

scanf("%d", &items[a]);

 }

printf("\n\n");

printf("\tOriginal Arrangement of Numbers");

printf("\n\n");

 for ( a = 0 ; a < num ; a++ ) {

 printf("\t%d ", items[a]);

 }

 for (a = 0 ; a < ( num - 1 ); a++)

 {

for (b = 0 ; b < num - a - 1; b++)

{

 if (items[b] > items[b+1])

 {

change= items[b];

items[b]= items[b+1];

items[b+1] = change;

 }

}

 }

 printf("\n\n");

 printf("\tAsceding Order of Numbers");

 printf("\n\n");

 for ( a = 0 ; a < num ; a++ ) {

 printf("\t%d ", items[a]);

 }

printf("\n\n");

printf("\tEnd of Program");

printf("\n\n");

system("pause");

}



 



Radix Sort in C